Skip to content

Commit

Permalink
CI: test different compilers
Browse files Browse the repository at this point in the history
  • Loading branch information
HiGarfield committed Jan 21, 2025
1 parent 759298c commit 94a6fee
Showing 1 changed file with 29 additions and 4 deletions.
33 changes: 29 additions & 4 deletions .github/workflows/CI.yml
Original file line number Diff line number Diff line change
Expand Up @@ -37,10 +37,29 @@ jobs:
else
export CFLAGS="$CFLAGS -I../fortify-headers -D_FORTIFY_SOURCE=3 -DFORTIFY_PEDANTIC_CHECKS -O3"
fi
make CHECK=1
if [[ "${{ matrix.os }}" == ubuntu-* ]]; then
sudo apt -y install musl-gcc
make CHECK=1 CC=musl-gcc
make clean
make CHECK=1 CC=clang
make clean
make CHECK=1 CC=g++
make clean
make CHECK=1 CC=gcc
make clean
make CHECK=1
elif [[ "${{ matrix.os }}" == macos-* ]]; then
make CHECK=1 CC=gcc
make clean
make CHECK=1 CC=g++
make clean
make CHECK=1 CC=clang
make clean
make CHECK=1
fi
sudo ./tests/process_iterator_test
random_file="$(mktemp $(printf 'X%.0s' $(seq 1 255)))"
cp ./tests/process_iterator_test ./tests/${random_file}
cp -f ./tests/process_iterator_test ./tests/${random_file}
echo "./tests/${random_file}"
sudo ./tests/${random_file}
Expand Down Expand Up @@ -71,14 +90,20 @@ jobs:
arch: ${{ matrix.arch }}
usesh: true
prepare: |
pkg install -y lang/gcc gmake sudo git
pkg install -y gcc g++ clang gmake sudo git
run: |
git clone https://github.com/jvoisin/fortify-headers
export CFLAGS="$CFLAGS -I../fortify-headers -D_FORTIFY_SOURCE=3 -DFORTIFY_PEDANTIC_CHECKS -O3"
gmake CHECK=1 CC=gcc
gmake clean
gmake CHECK=1 CC=g++
gmake clean
gmake CHECK=1 CC=clang
gmake clean
gmake CHECK=1
sudo ./tests/process_iterator_test
random_file="$(mktemp $(printf 'X%.0s' $(seq 1 255)))"
cp ./tests/process_iterator_test ./tests/${random_file}
cp -f ./tests/process_iterator_test ./tests/${random_file}
echo "./tests/${random_file}"
sudo ./tests/${random_file}
Expand Down

0 comments on commit 94a6fee

Please sign in to comment.