|
19 | 19 | run: echo "::set-output name=date_tag::$(date +%y%m%d-%H%M)" |
20 | 20 |
|
21 | 21 | build-su2: |
22 | | - needs: ['date-tag'] |
| 22 | + needs: [date-tag] |
23 | 23 | if: ${{ always() && !(contains(needs.*.result, 'failure')) }} |
24 | 24 | runs-on: ubuntu-latest |
25 | 25 | steps: |
@@ -47,11 +47,70 @@ jobs: |
47 | 47 | - name: Build and push build-su2 |
48 | 48 | run: docker buildx build --platform=linux/amd64 --platform=linux/arm64 -t ghcr.io/${{ github.repository_owner }}/su2/build-su2:${{ needs.date-tag.outputs.date_tag }} --push ./build/ |
49 | 49 |
|
50 | | - - name: Build and push build-su2-tsan |
51 | | - run: docker buildx build --platform=linux/amd64 --platform=linux/arm64 -t ghcr.io/${{ github.repository_owner }}/su2/build-su2-tsan:${{ needs.date-tag.outputs.date_tag }} --push --file ./build/Dockerfile.tsan ./build/ |
| 50 | + build-su2-tsan-platforms: |
| 51 | + needs: [date-tag] |
| 52 | + if: ${{ always() && !(contains(needs.*.result, 'failure')) }} |
| 53 | + runs-on: ubuntu-latest |
| 54 | + strategy: |
| 55 | + fail-fast: false, |
| 56 | + matrix: |
| 57 | + platform: [amd64, arm64] |
| 58 | + steps: |
| 59 | + - name: Checkout |
| 60 | + uses: actions/checkout@v2 |
| 61 | + |
| 62 | + - name: Set up QEMU |
| 63 | + uses: docker/setup-qemu-action@v1 |
| 64 | + with: |
| 65 | + platforms: arm64 |
| 66 | + |
| 67 | + - name: Set up Docker Buildx |
| 68 | + uses: docker/setup-buildx-action@v1 |
| 69 | + |
| 70 | + - name: Login to Github Docker Registry |
| 71 | + uses: docker/login-action@v1 |
| 72 | + with: |
| 73 | + registry: ghcr.io |
| 74 | + username: ${{ github.actor }} |
| 75 | + password: ${{ secrets.GITHUB_TOKEN }} |
| 76 | + |
| 77 | + - name: Docker Buildx Create |
| 78 | + run: docker buildx create --use |
| 79 | + |
| 80 | + - name: Build and push single-platform build-su2-tsan |
| 81 | + run: docker buildx build --platform=linux/${{ matrix.platform }} -t ghcr.io/${{ github.repository_owner }}/su2/build-su2-tsan-${{ matrix.platform }}:${{ needs.date-tag.outputs.date_tag }} --push --file ./build/Dockerfile.tsan ./build/ |
| 82 | + |
| 83 | + build-su2-tsan: |
| 84 | + needs: [date-tag, build-su2-tsan-platforms] |
| 85 | + if: ${{ always() && !(contains(needs.*.result, 'failure')) }} |
| 86 | + runs-on: ubuntu-latest |
| 87 | + steps: |
| 88 | + - name: Checkout |
| 89 | + uses: actions/checkout@v2 |
| 90 | + |
| 91 | + - name: Set up QEMU |
| 92 | + uses: docker/setup-qemu-action@v1 |
| 93 | + with: |
| 94 | + platforms: arm64 |
| 95 | + |
| 96 | + - name: Set up Docker Buildx |
| 97 | + uses: docker/setup-buildx-action@v1 |
| 98 | + |
| 99 | + - name: Login to Github Docker Registry |
| 100 | + uses: docker/login-action@v1 |
| 101 | + with: |
| 102 | + registry: ghcr.io |
| 103 | + username: ${{ github.actor }} |
| 104 | + password: ${{ secrets.GITHUB_TOKEN }} |
| 105 | + |
| 106 | + - name: Docker Buildx Create |
| 107 | + run: docker buildx create --use |
| 108 | + |
| 109 | + - name: Merge single-platform build-su2-tsan images |
| 110 | + run: docker buildx imagetools create -t ghcr.io/${{ github.repository_owner }}/su2/build-su2-tsan:${{ needs.date-tag.outputs.date_tag }} ghcr.io/${{ github.repository_owner }}/su2/build-su2-tsan-amd64:${{ needs.date-tag.outputs.date_tag }} ghcr.io/${{ github.repository_owner }}/su2/build-su2-tsan-arm64:${{ needs.date-tag.outputs.date_tag }} |
52 | 111 |
|
53 | 112 | test-su2: |
54 | | - needs: [date-tag, build-su2] |
| 113 | + needs: [date-tag, build-su2, build-su2-tsan] |
55 | 114 | if: ${{ always() && !(contains(needs.*.result, 'failure')) }} |
56 | 115 | runs-on: ubuntu-latest |
57 | 116 | steps: |
|
0 commit comments