Skip to content

Commit

Permalink
Updated CI to add ARM Linux runners.
Browse files Browse the repository at this point in the history
  • Loading branch information
tdulcet committed Jan 16, 2025
1 parent f9a53c3 commit acef15b
Showing 1 changed file with 37 additions and 8 deletions.
45 changes: 37 additions & 8 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ jobs:
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-20.04, ubuntu-22.04, ubuntu-24.04]
os: [ubuntu-20.04, ubuntu-22.04, ubuntu-24.04, ubuntu-22.04-arm, ubuntu-24.04-arm]
cc: [gcc, clang]
fail-fast: false
env:
Expand All @@ -35,7 +35,13 @@ jobs:
set -o pipefail
lscpu
cat /proc/cpuinfo
for mode in '' NOSIMD SSE2 AVX AVX2 AVX512; do
MODES=( '' NOSIMD )
if [[ $HOSTTYPE == aarch64 ]]; then
MODES+=( ASIMD )
else
MODES+=( SSE2 AVX AVX2 AVX512 )
fi
for mode in "${MODES[@]}"; do
echo -e "\n$mode\n"
bash -e -o pipefail -- makemake.sh use_hwloc $mode
(cd obj${mode:+_$mode}; make clean)
Expand All @@ -55,6 +61,9 @@ jobs:
grep 'warning:' build.log | sed 's/\x1B\[\([0-9]\+\(;[0-9]\+\)*\)\?[mK]//g' | awk '{ print $NF }' | sort | uniq -c | sort -nr >> $GITHUB_STEP_SUMMARY
echo '```' >> $GITHUB_STEP_SUMMARY
for s in tt t s m l; do time ./Mlucas -s $s -cpu "0:$(( $(nproc --all) - 1 ))" |& tee -a test.log; done
if [[ $HOSTTYPE == aarch64 ]]; then
cd ../obj_NOSIMD
fi
bash -- ../config-fermat.sh -cpu "0:$(( $(nproc --all) - 1 ))"
- uses: actions/upload-artifact@v4
if: always()
Expand All @@ -65,9 +74,10 @@ jobs:
Singlethread-Linux:
name: Mlucas Singlethreaded Linux

runs-on: ubuntu-latest
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-latest, ubuntu-24.04-arm]
cc: [gcc]
fail-fast: false
env:
Expand All @@ -82,7 +92,13 @@ jobs:
- name: Script
run: |
set -x
for mode in '' NOSIMD SSE2 AVX AVX2 AVX512; do
MODES=( '' NOSIMD )
if [[ $HOSTTYPE == aarch64 ]]; then
MODES+=( ASIMD )
else
MODES+=( SSE2 AVX AVX2 AVX512 )
fi
for mode in "${MODES[@]}"; do
echo -e "\n$mode\n"
bash -e -o pipefail -- makemake.sh $mode
(cd obj${mode:+_$mode}; make clean)
Expand All @@ -99,11 +115,14 @@ jobs:
done
cd obj
time ./Mlucas -s m
if [[ $HOSTTYPE == aarch64 ]]; then
cd ../obj_NOSIMD
fi
bash -- ../config-fermat.sh
- uses: actions/upload-artifact@v4
if: always()
with:
name: ubuntu_${{ matrix.cc }}_singlethreaded_mlucas
name: ${{ matrix.os }}_${{ matrix.cc }}_singlethreaded_mlucas
path: ${{ github.workspace }}

ASan-Linux:
Expand Down Expand Up @@ -292,7 +311,11 @@ jobs:
Singlethread-macOS:
name: Mlucas Singlethreaded macOS

runs-on: macos-latest
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [macos-13, macos-latest]
fail-fast: false
steps:
- uses: actions/checkout@v4
- name: Before script
Expand All @@ -303,7 +326,13 @@ jobs:
- name: Script
run: |
set -x
for mode in '' NOSIMD ASIMD; do
MODES=( '' NOSIMD )
if (( $(sysctl -n hw.optional.AdvSIMD) )); then
MODES+=( ASIMD )
else
MODES+=( SSE2 AVX AVX2 AVX512 )
fi
for mode in "${MODES[@]}"; do
echo -e "\n$mode\n"
bash -e -o pipefail -- makemake.sh $mode
(cd obj${mode:+_$mode}; make clean)
Expand All @@ -327,7 +356,7 @@ jobs:
- uses: actions/upload-artifact@v4
if: always()
with:
name: macos_singlethreaded_mlucas
name: ${{ matrix.os }}_singlethreaded_mlucas
path: ${{ github.workspace }}

ASan-macOS:
Expand Down

0 comments on commit acef15b

Please sign in to comment.