Fix macOS build. #240
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Source Corpus Tests | |
on: | |
push: | |
branches: | |
- master | |
pull_request: | |
branches: | |
- master | |
jobs: | |
test: | |
strategy: | |
matrix: | |
os: [ubuntu-latest] | |
slice: [1,2,3,4,5] | |
build_target: [x64] | |
runs-on: ${{ matrix.os }} | |
steps: | |
- uses: actions/checkout@v3 | |
with: | |
submodules: recursive | |
- uses: actions/checkout@v3 | |
with: | |
repository: dvander/sourcepawn-corpus | |
submodules: recursive | |
path: sourcepawn-corpus | |
# Setup Python for AMBuild | |
- uses: actions/setup-python@v4 | |
with: | |
python-version: 3.8 | |
- name: Install AMBuild | |
run: | | |
python -m pip install --upgrade pip setuptools wheel | |
pip install git+https://github.com/alliedmodders/ambuild | |
pip install progressbar2 | |
- name: Select clang compiler | |
run: | | |
echo "CC=clang" >> $GITHUB_ENV | |
echo "CXX=clang++" >> $GITHUB_ENV | |
clang --version | |
clang++ --version | |
- name: Build | |
run: | | |
mkdir objdir | |
cd objdir | |
python ../configure.py --enable-optimize --enable-debug --enable-asan --targets=${{ matrix.build_target }} | |
ambuild | |
echo "SPCOMP=objdir/spcomp/linux-x86_64/spcomp" >> $GITHUB_ENV | |
- name: Test | |
run: | | |
python tools/corpus/run.py ${SPCOMP} ${GITHUB_WORKSPACE}/sourcepawn-corpus -j \ | |
--fail-fast --num-slice 5 --slice ${{ matrix.slice }} |