add linux arm64 to builds and reshape how execution is done.

This commit is contained in:
William Bell
2025-08-16 15:25:33 +01:00
parent 78a1edd572
commit eb285b6e8f
4 changed files with 98 additions and 64 deletions

View File

@@ -10,7 +10,7 @@ on:
- '*' # Any tag
jobs:
build-linux:
build-linux-x86_64:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
@@ -51,7 +51,51 @@ jobs:
- name: Upload artifact
uses: actions/upload-artifact@v4
with:
name: linux-artifact
name: linux-${{ matrix.arch }}-artifact
path: ${{ env.TAR_NAME }}
build-linux-arm64:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
with:
submodules: recursive
- name: Set up QEMU
uses: docker/setup-qemu-action@v3
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
- name: Run build in arm64 container
run: |
docker run --rm --platform linux/arm64 \
-v $PWD:/work -w /work \
ubuntu:latest \
bash -c "
apt-get update && apt-get install -y python3-pip g++ flex bison &&
pip install conan &&
conan profile detect --force &&
conan install . --build=missing &&
conan build .
"
- name: Package
run: |
TAG=${GITHUB_REF##refs/tags/}
OS=$(uname -s | tr '[:upper:]' '[:lower:]')
ARCH=arm64
FOLDER="chloride-$TAG-$OS-$ARCH"
TAR="$FOLDER.tar.gz"
mv build/bin "$FOLDER"
cp LICENSE.txt "$FOLDER"
tar -czf "$TAR" "$FOLDER"
echo "TAR_NAME=$TAR" >> $GITHUB_ENV
- name: Upload artifact
uses: actions/upload-artifact@v4
with:
name: linux-${{ matrix.arch }}-artifact
path: ${{ env.TAR_NAME }}
build-macos:
@@ -176,7 +220,7 @@ jobs:
release:
runs-on: ubuntu-latest
needs: [build-linux, build-macos, build-windows]
needs: [build-linux-x86_64, build-linux-arm64, build-macos, build-windows]
steps:
- name: Download artifacts
uses: actions/download-artifact@v4