Skip to content

Commit 1e9b8cf

Browse files
quark-zjufacebook-github-bot
authored andcommitted
github: attempt to build linux arm64 binary
Summary: The `manylinux` Docker image contains both the x64 and arm64 versions. So let's try build the arm64 linux binary too. Note there is [no `ubuntu-arm-latest`](https://github.com/orgs/community/discussions/148648#discussioncomment-11858287). Reviewed By: muirdm Differential Revision: D75883597 fbshipit-source-id: 1dd9a216f7e15aaf45ef0fa0fa68726e45252f3f
1 parent 1203b13 commit 1e9b8cf

1 file changed

Lines changed: 20 additions & 8 deletions

File tree

.github/workflows/sapling-cli-manylinux-release.yml

Lines changed: 20 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
name: Release - Linux x64
1+
name: Release - Linux (x64, arm64)
22
'on':
33
workflow_dispatch: null
44
push:
@@ -7,7 +7,10 @@ name: Release - Linux x64
77
- test-release-*
88
jobs:
99
build:
10-
runs-on: ubuntu-latest
10+
strategy:
11+
matrix:
12+
runs-on: [ubuntu-latest, ubuntu-24.04-arm]
13+
runs-on: ${{ matrix.runs-on }}
1114
container:
1215
image: ${{ format('ghcr.io/{0}/manylinux_2_34:latest', github.repository) }}
1316
steps:
@@ -17,20 +20,29 @@ jobs:
1720
run: git config --global --add safe.directory "$PWD"
1821
- name: rustup
1922
run: rustup default stable
20-
- name: set-env SAPLING_VERSION
23+
- name: Set SAPLING_VERSION
2124
shell: bash
2225
run: echo "SAPLING_VERSION=$(ci/tag-name.sh)" >> $GITHUB_ENV
26+
- name: Set ARCH
27+
shell: bash
28+
run: |
29+
case "${{ matrix.runs-on }}" in
30+
"ubuntu-latest")
31+
echo "ARCH=x64" ;;
32+
"ubuntu-24.04-arm")
33+
echo "ARCH=arm64" ;;
34+
esac >> $GITHUB_ENV
2335
- name: Build
2436
working-directory: ./eden/scm
2537
run: ${{ format('VERSION={0} python3 ./packaging/manylinux/build.py', env.SAPLING_VERSION) }}
2638
- name: Rename .tar.xz
2739
working-directory: ./eden/scm
28-
run: ${{ format('mv sapling-manylinux.tar.xz sapling-{0}-linux-x64.tar.xz', env.SAPLING_VERSION) }}
40+
run: ${{ format('mv sapling-manylinux.tar.xz sapling-{0}-linux-{1}.tar.xz', env.SAPLING_VERSION, env.ARCH) }}
2941
- name: Upload Artifact
3042
uses: actions/upload-artifact@v4
3143
with:
32-
name: linux-x64-tarball
33-
path: ./eden/scm/sapling_*.tar.xz
44+
name: linux-${{ env.ARCH }}-tarball
45+
path: ./eden/scm/sapling*.tar.xz
3446
publish:
3547
runs-on: ubuntu-latest
3648
needs: build
@@ -39,10 +51,10 @@ jobs:
3951
uses: actions/checkout@v3
4052
- name: Grant Access
4153
run: git config --global --add safe.directory "$PWD"
42-
- name: Download Artifact
54+
- name: Download Artifacts
4355
uses: actions/[email protected]
4456
with:
45-
name: linux-x64-tarball
57+
pattern: sapling*.tar.xz
4658
- name: Create pre-release
4759
env:
4860
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

0 commit comments

Comments
 (0)