Skip to content

Commit b23633e

Browse files
Add aarch64 to glibc 2.28 release workflow (#10777)
## Summary - Extend the glibc-compatible Linux release build to produce both x86_64 and aarch64 artifacts - aarch64 build uses `manylinux_2_28_aarch64` container with gcc-toolset-11 - Rename artifacts from `glibc-2.27` to `glibc-2.28` to match actual container glibc version Relates to shader-slang/slangpy#924 ## Test plan - [ ] Verify x86_64 build still works (existing behavior, different container reference) - [ ] Verify aarch64 build succeeds in `manylinux_2_28_aarch64` container - [ ] Verify release artifacts are named correctly with `glibc-2.28`
1 parent 541d520 commit b23633e

1 file changed

Lines changed: 79 additions & 0 deletions

File tree

Lines changed: 79 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,79 @@
1+
on:
2+
workflow_dispatch:
3+
push:
4+
tags:
5+
- "v20[2-9][0-9].[0-9]*"
6+
schedule:
7+
# Run nightly at 2 AM UTC
8+
- cron: "0 2 * * *"
9+
10+
name: Linux glibc 2.28 Release
11+
jobs:
12+
build:
13+
strategy:
14+
matrix:
15+
include:
16+
- platform: x86_64
17+
runs-on: ubuntu-22.04
18+
docker-image: "quay.io/pypa/manylinux_2_28_x86_64"
19+
- platform: aarch64
20+
runs-on: ubuntu-22.04-arm
21+
docker-image: "quay.io/pypa/manylinux_2_28_aarch64"
22+
fail-fast: false
23+
runs-on: ${{ matrix.runs-on }}
24+
steps:
25+
- uses: actions/checkout@v4
26+
with:
27+
submodules: "recursive"
28+
fetch-depth: "0"
29+
fetch-tags: true
30+
31+
- name: Build
32+
run: |
33+
docker run --rm \
34+
-v ${{ github.workspace }}:/home/app \
35+
-v /etc/ssl/certs/ca-certificates.crt:/etc/ssl/certs/ca-certificates.crt \
36+
${{ matrix.docker-image }} \
37+
bash -euo pipefail -c '
38+
yum install -y gcc-toolset-11-gcc gcc-toolset-11-gcc-c++
39+
source /opt/rh/gcc-toolset-11/enable
40+
pip3 install cmake==3.25.0 ninja==1.11.1.4
41+
cd /home/app
42+
git config --global --add safe.directory /home/app
43+
cmake --preset default --fresh -DSLANG_SLANG_LLVM_FLAVOR=DISABLE
44+
cmake --build --preset release -j $(nproc)
45+
cpack --preset release -G ZIP
46+
cpack --preset release -G TGZ
47+
'
48+
49+
- name: Package Slang
50+
id: package
51+
if: startsWith(github.ref, 'refs/tags/v')
52+
run: |
53+
triggering_ref=${{ github.ref_name }}
54+
if [[ $triggering_ref =~ ^v[0-9] ]]; then
55+
version=${triggering_ref#v}
56+
else
57+
version=$triggering_ref
58+
fi
59+
# Sanitize version for use in filenames (replace path separators)
60+
version=${version//\//-}
61+
base=$(pwd)/slang-${version}-linux-${{ matrix.platform }}-glibc-2.28
62+
sudo mv "$(pwd)/build/dist-release/slang.zip" "${base}.zip"
63+
echo "SLANG_BINARY_ARCHIVE_ZIP=${base}.zip" >> "$GITHUB_OUTPUT"
64+
sudo mv "$(pwd)/build/dist-release/slang.tar.gz" "${base}.tar.gz"
65+
echo "SLANG_BINARY_ARCHIVE_TAR=${base}.tar.gz" >> "$GITHUB_OUTPUT"
66+
- name: File check
67+
run: |
68+
find "build/dist-release" -type f ! -iname '*.md' ! -iname '*.h' -print0 | xargs -0 file
69+
- name: UploadBinary
70+
uses: softprops/action-gh-release@v1
71+
if: startsWith(github.ref, 'refs/tags/v')
72+
with:
73+
draft: ${{contains(github.ref, 'draft')}}
74+
prerelease: ${{contains(github.ref, 'draft')}}
75+
files: |
76+
${{ steps.package.outputs.SLANG_BINARY_ARCHIVE_ZIP }}
77+
${{ steps.package.outputs.SLANG_BINARY_ARCHIVE_TAR }}
78+
env:
79+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

0 commit comments

Comments
 (0)