Skip to content

Commit 385154a

Browse files
committed
Add CI jobs for Linux ARM64 (QEMU) and Windows ARM64 (Cross-Compile), remove CodeQL
1 parent 08b6a05 commit 385154a

File tree

2 files changed

+50
-1
lines changed

2 files changed

+50
-1
lines changed

.github/workflows/ci.yml

Lines changed: 49 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -83,3 +83,52 @@ jobs:
8383
cd ..
8484
chmod +x ./test-high/run-tests.sh
8585
./test-high/run-tests.sh
86+
./test-high/run-tests.sh
87+
88+
linux-arm64:
89+
runs-on: ubuntu-latest
90+
name: Linux ARM64 (QEMU)
91+
steps:
92+
- uses: actions/checkout@v4
93+
94+
- name: Set up QEMU
95+
uses: docker/setup-qemu-action@v3
96+
97+
- name: Run build and test in ARM64 container
98+
run: |
99+
docker run --rm --platform linux/arm64 -v $PWD:/src -w /src ubuntu:latest /bin/bash -c "
100+
apt-get update && apt-get install -y cmake g++ make
101+
cmake -B build-arm64 -DPCG_CPP_BUILD_SAMPLES=ON -DPCG_CPP_BUILD_TESTS=ON -DCMAKE_BUILD_TYPE=Release
102+
cmake --build build-arm64 --config Release
103+
cd build-arm64 && ctest -C Release --output-on-failure
104+
cd ..
105+
chmod +x ./test-high/run-tests.sh
106+
# Set explicit build dir for run-tests.sh since different name
107+
export BINDIR=./build-arm64/test-high
108+
# run-tests.sh might need adaptation for explicit BINDIR or we move binaries.
109+
# Simplest is to just run ctest which covers C++ tests.
110+
# But for script tests, we rely on run-tests.sh auto-detection or adaptation.
111+
# Let's rely on CTest for now as it's cleaner in container,
112+
# but we can try run-tests.sh if it finds them.
113+
./test-high/run-tests.sh
114+
"
115+
116+
windows-arm64-build:
117+
runs-on: windows-latest
118+
name: Windows ARM64 (Cross-Compile)
119+
steps:
120+
- uses: actions/checkout@v4
121+
122+
- name: Configure CMake for ARM64
123+
run: >
124+
cmake -B build-arm64
125+
-A ARM64
126+
-DPCG_CPP_BUILD_SAMPLES=ON
127+
-DPCG_CPP_BUILD_TESTS=ON
128+
-DCMAKE_BUILD_TYPE=Release
129+
130+
- name: Build (ARM64)
131+
run: cmake --build build-arm64 --config Release
132+
133+
# Note: We cannot run CTest or generated binaries on x64 host without emulation.
134+
# This job verifies that the code compiles successfully for ARM64 target.

test-high/run-tests.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@
2424
BASEDIR=$(dirname "$0")
2525
cd "$BASEDIR"
2626

27-
BINDIR="."
27+
BINDIR="${BINDIR:-.}"
2828

2929
# Check if executables are in current directory (Makefile build)
3030
if [ ! -f "./check-pcg32" ] && [ ! -f "./check-pcg32.exe" ]; then

0 commit comments

Comments
 (0)