|
1 |
| -name: Publish Docker image |
| 1 | +name: Publish Docker container |
2 | 2 |
|
3 | 3 | on:
|
4 | 4 | workflow_dispatch:
|
|
20 | 20 |
|
21 | 21 | jobs:
|
22 | 22 | push_to_registry:
|
23 |
| - name: Build container - Julia ${{ matrix.julia }} - CUDA ${{ matrix.cuda }} |
| 23 | + name: Container for ${{ matrix.platform }} - Julia ${{ matrix.julia }} - CUDA ${{ matrix.cuda }} |
24 | 24 | runs-on: ubuntu-latest
|
25 | 25 | permissions:
|
26 | 26 | contents: read
|
|
30 | 30 | matrix:
|
31 | 31 | julia: ["1.10", "1.11"]
|
32 | 32 | cuda: ["11.8", "12.6"]
|
| 33 | + platform: ["linux/amd64", "linux/arm64"] |
33 | 34 | include:
|
34 | 35 | - julia: "1.11"
|
35 | 36 | cuda: "12.6"
|
| 37 | + platform: "linux/amd64" |
| 38 | + default: true |
| 39 | + - julia: "1.11" |
| 40 | + cuda: "12.6" |
| 41 | + platform: "linux/arm64" |
36 | 42 | default: true
|
37 | 43 |
|
38 | 44 | steps:
|
|
68 | 74 | CUDA_MAJOR=$(echo ${{ matrix.cuda }} | cut -d'.' -f1)
|
69 | 75 | echo "major=${CUDA_MAJOR}" >> $GITHUB_OUTPUT
|
70 | 76 |
|
| 77 | + - name: Set CPU target |
| 78 | + id: cpu_target |
| 79 | + run: | |
| 80 | + if [[ "${{ matrix.platform }}" == "linux/amd64" ]]; then |
| 81 | + echo "target=generic;sandybridge,-xsaveopt,clone_all;haswell,-rdrnd,base(1)" >> $GITHUB_OUTPUT |
| 82 | + elif [[ "${{ matrix.platform }}" == "linux/arm64" ]]; then |
| 83 | + echo "target=generic;cortex-a57;thunderx2t99;carmel,clone_all;apple-m1,base(3);neoverse-512tvb,base(3)" >> $GITHUB_OUTPUT |
| 84 | + fi |
| 85 | +
|
71 | 86 | - name: Log in to registry
|
72 | 87 | uses: docker/login-action@v3
|
73 | 88 | with:
|
@@ -97,9 +112,11 @@ jobs:
|
97 | 112 | context: .
|
98 | 113 | push: true
|
99 | 114 | provenance: false # the build fetches the repo again, so provenance tracking is not useful
|
| 115 | + platforms: ${{ matrix.platform }} |
100 | 116 | tags: ${{ steps.meta.outputs.tags }}
|
101 | 117 | labels: ${{ steps.meta.outputs.labels }}
|
102 | 118 | build-args: |
|
103 | 119 | JULIA_VERSION=${{ matrix.julia }}
|
104 | 120 | CUDA_VERSION=${{ matrix.cuda }}
|
105 | 121 | PACKAGE_SPEC=CUDA#${{ steps.pkg.outputs.ref }}
|
| 122 | + JULIA_CPU_TARGET=${{ steps.cpu_target.outputs.target }} |
0 commit comments