Skip to content

add GitHub action that use Testing Farm #1

add GitHub action that use Testing Farm

add GitHub action that use Testing Farm #1

name: Build Linux artifacts
on:
push:
branches:
- "main"
paths-ignore:
- 'docs/**'
- 'images/docs-builder/**'
- '*.adoc'
pull_request:
paths-ignore:
- 'docs/**'
- 'images/docs-builder/**'
- '*.adoc'
env:
IMAGE_NAME_E2E: crc-e2e
IMAGE_NAME_INTEGRATION: crc-integration
jobs:
build-installer:
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
go: ['1.21']
steps:
- name: Check out repository code
uses: actions/checkout@v4
- name: Set up Go
uses: actions/setup-go@v5
with:
go-version: ${{ matrix.go }}
- name: Build Linux installer
run: make out/linux-arm64/crc
- name: Upload linux binary
uses: actions/upload-artifact@v4
with:
name: linux-binary
path: "out/linux-arm64/crc"
build-qe:
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
os: ['linux']
arch: ['amd64', 'arm64']
steps:
- name: Check out repository code
uses: actions/checkout@v4
- name: Build qe oci images ${{matrix.os}}-${{matrix.arch}}
run: |
# e2e
CRC_E2E_IMG_VERSION=gh ARCH=${{matrix.arch}} OS=${{matrix.os}} make containerized_e2e
podman save -o ${{ env.IMAGE_NAME_E2E }}-${{matrix.os}}-${{matrix.arch}}.tar \
quay.io/crcont/${{ env.IMAGE_NAME_E2E}}:gh-${{matrix.os}}-${{matrix.arch}}
# integration
CRC_INTEGRATION_IMG_VERSION=gh ARCH=${{matrix.arch}} OS=${{matrix.os}} make containerized_integration
podman save -o ${{ env.IMAGE_NAME_INTEGRATION }}-${{matrix.os}}-${{matrix.arch}}.tar \
quay.io/crcont/${{ env.IMAGE_NAME_INTEGRATION}}:gh-${{matrix.os}}-${{matrix.arch}}
- name: Upload e2e ${{matrix.os}}-${{matrix.arch}}
uses: actions/upload-artifact@v4
with:
name: ${{ env.IMAGE_NAME_E2E }}-${{matrix.os}}-${{matrix.arch}}
path: ${{ env.IMAGE_NAME_E2E }}-${{matrix.os}}-${{matrix.arch}}.tar
- name: Upload integration ${{matrix.os}}-${{matrix.arch}}
uses: actions/upload-artifact@v4
with:
name: ${{ env.IMAGE_NAME_INTEGRATION }}-${{matrix.os}}-${{matrix.arch}}
path: ${{ env.IMAGE_NAME_INTEGRATION }}-${{matrix.os}}-${{matrix.arch}}.tar
save-gh-context:
runs-on: ubuntu-latest
strategy:
fail-fast: false
steps:
- name: Save the GH context in an artifact
env:
GH_CONTEXT: ${{ toJSON(github) }}
run: echo $GH_CONTEXT > gh_context.json
- name: Upload the GH context artifact
uses: actions/upload-artifact@v4
with:
name: gh-context
path: gh_context.json