|
9 | 9 | - 'master' |
10 | 10 |
|
11 | 11 | jobs: |
12 | | - docker: |
| 12 | + build-su2: |
13 | 13 | runs-on: ubuntu-latest |
| 14 | + outputs: |
| 15 | + date_tag: ${{ steps.vars.outputs.date_tag }} |
14 | 16 | steps: |
15 | 17 | - name: Checkout |
16 | 18 | uses: actions/checkout@v2 |
|
40 | 42 | - name: Build and push build-su2 |
41 | 43 | run: docker buildx build --platform=linux/amd64 --platform=linux/arm64 -t ghcr.io/${{ github.repository_owner }}/su2/build-su2:${{ steps.vars.outputs.date_tag }} --push ./build/ |
42 | 44 |
|
| 45 | + test-su2: |
| 46 | + needs: [build-su2] |
| 47 | + if: ${{ always() && !(contains(needs.*.result, 'failure')) }} |
| 48 | + runs-on: ubuntu-latest |
| 49 | + steps: |
| 50 | + - name: Checkout |
| 51 | + uses: actions/checkout@v2 |
| 52 | + |
| 53 | + - name: Set up QEMU |
| 54 | + uses: docker/setup-qemu-action@v1 |
| 55 | + with: |
| 56 | + platforms: arm64 |
| 57 | + |
| 58 | + - name: Set up Docker Buildx |
| 59 | + uses: docker/setup-buildx-action@v1 |
| 60 | + |
| 61 | + - name: Login to Github Docker Registry |
| 62 | + uses: docker/login-action@v1 |
| 63 | + with: |
| 64 | + registry: ghcr.io |
| 65 | + username: ${{ github.actor }} |
| 66 | + password: ${{ secrets.GITHUB_TOKEN }} |
| 67 | + |
| 68 | + - name: Docker Buildx Create |
| 69 | + run: docker buildx create --use |
| 70 | + |
43 | 71 | - name: Build and push test-su2 |
44 | | - run: docker buildx build --platform=linux/amd64 --platform=linux/arm64 --build-arg BASE_IMAGE=ghcr.io/${{ github.repository_owner }}/su2/build-su2:${{ steps.vars.outputs.date_tag }} -t ghcr.io/${{ github.repository_owner }}/su2/test-su2:${{ steps.vars.outputs.date_tag }} --push ./test/ |
| 72 | + run: docker buildx build --platform=linux/amd64 --platform=linux/arm64 --build-arg BASE_IMAGE=ghcr.io/${{ github.repository_owner }}/su2/build-su2:${{ needs.build-su2.outputs.date_tag }} -t ghcr.io/${{ github.repository_owner }}/su2/test-su2:${{ needs.build-su2.outputs.date_tag }} --push ./test/ |
| 73 | + |
| 74 | + cross-build-su2-mac: |
| 75 | + needs: [build-su2] |
| 76 | + if: ${{ always() && !(contains(needs.*.result, 'failure')) }} |
| 77 | + runs-on: ubuntu-latest |
| 78 | + steps: |
| 79 | + - name: Checkout |
| 80 | + uses: actions/checkout@v2 |
| 81 | + |
| 82 | + - name: Set up QEMU |
| 83 | + uses: docker/setup-qemu-action@v1 |
| 84 | + with: |
| 85 | + platforms: arm64 |
| 86 | + |
| 87 | + - name: Set up Docker Buildx |
| 88 | + uses: docker/setup-buildx-action@v1 |
| 89 | + |
| 90 | + - name: Login to Github Docker Registry |
| 91 | + uses: docker/login-action@v1 |
| 92 | + with: |
| 93 | + registry: ghcr.io |
| 94 | + username: ${{ github.actor }} |
| 95 | + password: ${{ secrets.GITHUB_TOKEN }} |
| 96 | + |
| 97 | + - name: Docker Buildx Create |
| 98 | + run: docker buildx create --use |
| 99 | + |
| 100 | + - name: Build and push build-su2-cross |
| 101 | + run: docker buildx build --platform=linux/amd64 --platform=linux/arm64 --build-arg BASE_IMAGE=ghcr.io/${{ github.repository_owner }}/su2/build-su2:${{ needs.build-su2.outputs.date_tag }} -t ghcr.io/${{ github.repository_owner }}/su2/build-su2-cross-stage1:${{ needs.build-su2.outputs.date_tag }} --push --file Dockerfile.stage1 ./build_cross/ |
| 102 | + |
| 103 | + cross-build-su2-linux: |
| 104 | + needs: [cross-build-su2-mac] |
| 105 | + if: ${{ always() && !(contains(needs.*.result, 'failure')) }} |
| 106 | + runs-on: ubuntu-latest |
| 107 | + steps: |
| 108 | + - name: Checkout |
| 109 | + uses: actions/checkout@v2 |
| 110 | + |
| 111 | + - name: Set up QEMU |
| 112 | + uses: docker/setup-qemu-action@v1 |
| 113 | + with: |
| 114 | + platforms: arm64 |
| 115 | + |
| 116 | + - name: Set up Docker Buildx |
| 117 | + uses: docker/setup-buildx-action@v1 |
| 118 | + |
| 119 | + - name: Login to Github Docker Registry |
| 120 | + uses: docker/login-action@v1 |
| 121 | + with: |
| 122 | + registry: ghcr.io |
| 123 | + username: ${{ github.actor }} |
| 124 | + password: ${{ secrets.GITHUB_TOKEN }} |
| 125 | + |
| 126 | + - name: Docker Buildx Create |
| 127 | + run: docker buildx create --use |
45 | 128 |
|
46 | 129 | - name: Build and push build-su2-cross |
47 | | - run: docker buildx build --platform=linux/amd64 --platform=linux/arm64 --build-arg BASE_IMAGE=ghcr.io/${{ github.repository_owner }}/su2/build-su2:${{ steps.vars.outputs.date_tag }} -t ghcr.io/${{ github.repository_owner }}/su2/build-su2-cross:${{ steps.vars.outputs.date_tag }} --push ./build_cross/ |
| 130 | + run: docker buildx build --platform=linux/amd64 --platform=linux/arm64 --build-arg BASE_IMAGE=ghcr.io/${{ github.repository_owner }}/su2/build-su2-cross-stage1:${{ needs.build-su2.outputs.date_tag }} -t ghcr.io/${{ github.repository_owner }}/su2/build-su2-cross:${{ needs.build-su2.outputs.date_tag }} --push --file Dockerfile.stage2 ./build_cross/ |
0 commit comments