Set version correctly for tags. #136
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: C/C++ CI | |
on: [push, pull_request] | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
strategy: | |
matrix: | |
include: | |
- makeopts: "CC=gcc" | |
- makeopts: "CFLAGS=-fsanitize=address" | |
- makeopts: "CFLAGS=-fsanitize=undefined" | |
- makeopts: "CC=clang" | |
steps: | |
- uses: actions/checkout@v3 | |
with: | |
submodules: true | |
- name: Install dependencies | |
run: | | |
sudo apt update | |
sudo apt -q install chocolate-doom deutex | |
- name: make | |
run: make -j ${{ matrix.makeopts }} | |
- name: run tests | |
run: make -j check ${{ matrix.makeopts }} | |
- name: quickcheck | |
run: make -j quickcheck ${{ matrix.makeopts }} | |
macos_build: | |
runs-on: macos-latest | |
steps: | |
- uses: actions/checkout@v3 | |
with: | |
submodules: true | |
#- name: Install dependencies | |
# run: | | |
# brew install chocolate-doom | |
- name: make | |
run: make | |
# needs deutex | |
# - name: run tests | |
# run: make check | |
#- name: quickcheck | |
# run: make -j quickcheck SOURCE_PORT=$(which chocolate-doom) | |
windows_crossbuild: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Find Git version | |
id: version | |
run: | | |
if git describe --exact-match --tags >/dev/null; then | |
VERSION=$(git describe --exact-match --tags) | |
VERSION=${VERSION/#wadptr-/} | |
else | |
VERSION=$(git rev-parse --short HEAD) | |
fi | |
echo "VERSION=$VERSION-win64" >> $GITHUB_OUTPUT | |
- name: Install dependencies | |
run: | | |
sudo apt update | |
sudo apt -q install mingw-w64 zip pandoc | |
- name: make | |
run: | | |
make -j CC=x86_64-w64-mingw32-gcc \ | |
WINDRES=x86_64-w64-mingw32-windres | |
- name: make package | |
run: | | |
make windist VERSION=${{steps.version.outputs.VERSION}} \ | |
STRIP=x86_64-w64-mingw32-strip | |
- name: Upload build | |
uses: actions/upload-artifact@v1 | |
with: | |
path: "dist" | |
name: wadptr-${{steps.version.outputs.VERSION}} |