CMake #1637
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: CMake | |
on: | |
# Trigger the workflow on push or pull request, | |
# but only for the main branch | |
push: | |
branches: | |
- master | |
pull_request: | |
branches: | |
- master | |
# Also trigger on page_build, as well as release created events | |
page_build: | |
release: | |
types: # This configuration does not affect the page_build event above | |
- created | |
jobs: | |
build_and_release: | |
strategy: | |
fail-fast: false | |
matrix: | |
# os: [ubuntu-latest, ubuntu-18.04] | |
os : [ubuntu-20.04] | |
compiler: [gcc] | |
runs-on: ${{ matrix.os }} | |
steps: | |
- uses: actions/checkout@v4 | |
with: | |
submodules: recursive | |
- name: Format | |
run: make fmt | |
- name: Release Build Test | |
env: | |
CC: ${{ matrix.compiler }} | |
CC_FOR_BUILD: ${{ matrix.compiler }} | |
run: make run_test | |
- name: Asan Build Test | |
env: | |
CC: ${{ matrix.compiler }} | |
CC_FOR_BUILD: ${{ matrix.compiler }} | |
run: make run_test_asan | |
- name: Prepare for release | |
run: tar -zcf odyssey.linux-amd64.$(git rev-parse --short HEAD).tar.gz sources | |
- name: Release | |
uses: fnkr/github-action-ghr@v1 | |
if: startsWith(github.ref, 'refs/tags/') && matrix.os == 'ubuntu-18.04' && matrix.compiler == 'gcc' # We need to release only once | |
env: | |
GHR_PATH: odyssey.linux-amd64.$(git rev-parse --short HEAD).tar.gz | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} |