-
Notifications
You must be signed in to change notification settings - Fork 162
55 lines (45 loc) · 1.47 KB
/
cmake.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
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@v2
with:
submodules: recursive
- name: Install dependencies
run: sudo bash scripts/install_ci.sh
- name: Format
run: ./run-clang-format/run-clang-format.py -r --clang-format-executable clang-format-11 modules sources stress test third_party
- name: Test
env:
CC: ${{ matrix.compiler }}
CC_FOR_BUILD: ${{ matrix.compiler }}
run: make run_test
- 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 }}