| name: AWS Import | |
| on: | |
| push: | |
| branches: | |
| - awstest | |
| workflow_dispatch: | |
| env: | |
| MAKEFLAGS: "-j4 GITVERSION=${{ github.sha }}" | |
| jobs: | |
| build: | |
| name: Build / ${{ matrix.arch }} | |
| runs-on: ubuntu-latest | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| include: | |
| - arch: arm64 | |
| platform: efi | |
| - arch: x86_64 | |
| platform: pcbios | |
| container: | |
| image: ghcr.io/ipxe/ipxe-builder-${{ matrix.arch }} | |
| env: | |
| bindir: bin-${{ matrix.arch }}-${{ matrix.platform }} | |
| steps: | |
| - name: Check out code | |
| uses: actions/checkout@v6 | |
| - name: Build | |
| working-directory: src | |
| run: | | |
| make CONFIG=cloud EMBED=config/cloud/aws.ipxe \ | |
| ${{ env.bindir }}/ipxe.usb | |
| - name: Upload | |
| uses: actions/upload-artifact@v6 | |
| with: | |
| name: ${{ env.bindir }} | |
| if-no-files-found: error | |
| path: | | |
| src/${{ env.bindir }}/ipxe.usb | |
| import: | |
| name: Import | |
| runs-on: ubuntu-latest | |
| needs: | |
| - build | |
| container: | |
| image: ghcr.io/ipxe/ipxe-builder-cloud | |
| env: | |
| amilist: >- | |
| ${{ github.ref == 'refs/heads/awstest' && | |
| 'ipxetest-amilist.txt' || 'amilist.txt' }} | |
| binaries: >- | |
| bin-arm64-efi/ipxe.usb | |
| bin-x86_64-pcbios/ipxe.usb | |
| bucket: ${{ vars.AWS_BUCKET }} | |
| family: >- | |
| ${{ github.ref == 'refs/heads/awstest' && | |
| '--family ipxetest' || '' }} | |
| retain: >- | |
| ${{ github.ref == 'refs/heads/awstest' && | |
| '0' || '3' }} | |
| environment: aws-import | |
| permissions: | |
| id-token: write | |
| contents: read | |
| steps: | |
| - name: Check out code | |
| uses: actions/checkout@v6 | |
| - name: Download | |
| uses: actions/download-artifact@v7 | |
| with: | |
| path: src | |
| pattern: "bin-*" | |
| - name: Log in | |
| uses: aws-actions/configure-aws-credentials@v6 | |
| with: | |
| role-to-assume: ${{ vars.AWS_ROLE }} | |
| aws-region: ${{ vars.AWS_REGION }} | |
| - name: Import | |
| working-directory: src | |
| run: | | |
| ../contrib/cloud/aws-import \ | |
| --public \ | |
| --overwrite \ | |
| --retain ${{ env.retain }} \ | |
| --wiki ${{ env.amilist }} \ | |
| --bucket ${{ env.bucket }} \ | |
| --commit ${{ github.sha }} \ | |
| ${{ env.family }} \ | |
| ${{ env.binaries }} | |
| - name: Upload | |
| uses: actions/upload-artifact@v6 | |
| with: | |
| name: amilist | |
| if-no-files-found: error | |
| path: | | |
| src/${{ env.amilist }} | |
| types: | |
| name: Type coverage | |
| uses: ./.github/workflows/aws-types.yml | |
| permissions: | |
| id-token: write | |
| contents: read | |
| test: | |
| name: >- | |
| Test / ${{ matrix.type }}${{ '' | |
| }}${{ contains ( fromJson ( vars.AWS_SKIP ).*.type, matrix.type ) && | |
| ' (skipped)' || '' }} | |
| runs-on: ubuntu-latest | |
| needs: | |
| - import | |
| - types | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| include: ${{ fromJson ( vars.AWS_TEST ) }} | |
| container: | |
| image: ghcr.io/ipxe/ipxe-builder-cloud | |
| env: | |
| family: >- | |
| ${{ github.ref == 'refs/heads/awstest' && 'ipxetest' || 'iPXE' }} | |
| testname: >- | |
| gh-${{ github.run_id }}-${{ github.run_attempt }}-${{ matrix.type }} | |
| environment: aws-import | |
| permissions: | |
| id-token: write | |
| contents: read | |
| steps: | |
| - name: Check out code | |
| uses: actions/checkout@v6 | |
| - name: Log in | |
| uses: aws-actions/configure-aws-credentials@v6 | |
| with: | |
| role-to-assume: ${{ vars.AWS_ROLE }} | |
| aws-region: ${{ vars.AWS_REGION }} | |
| - name: Test | |
| if: >- | |
| ${{ ! contains ( fromJson ( vars.AWS_SKIP ).*.type, matrix.type ) }} | |
| working-directory: src | |
| run: | | |
| ../contrib/cloud/aws-test \ | |
| --verbose \ | |
| --name ${{ env.testname }} \ | |
| --family ${{ env.family }} \ | |
| --commit ${{ github.sha }} \ | |
| --region ${{ matrix.region }} \ | |
| ${{ matrix.type }} |