-
Notifications
You must be signed in to change notification settings - Fork 11
58 lines (49 loc) · 1.41 KB
/
Copy pathbuild-test.yml
File metadata and controls
58 lines (49 loc) · 1.41 KB
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
56
57
58
name: Build and Test
on:
push:
branches:
- master
pull_request:
branches:
- master
env:
BUILD_TYPE: Debug
jobs:
test:
runs-on: ubuntu-latest
if: "!contains(github.event.head_commit.message, 'skip-ci')"
timeout-minutes: 30
strategy:
matrix:
llvm: ['13', '14', '15', '16']
config:
- {cc: gcc-9, cxx: g++-9}
- {cc: gcc-10, cxx: g++-10}
- {cc: gcc-11, cxx: g++-11}
- {cc: gcc-12, cxx: g++-12}
steps:
- name: Install LLVM and Clang
run: |
wget https://apt.llvm.org/llvm.sh
chmod +x llvm.sh
sudo ./llvm.sh ${{matrix.llvm}}
- name: Checkout YuLang
uses: actions/checkout@v2
with:
submodules: recursive
- name: Create Build Environment
run: cmake -E make_directory ${{runner.workspace}}/build
- name: Configure CMake
working-directory: ${{runner.workspace}}/build
shell: bash
env:
CC: ${{matrix.config.cc}}
CXX: ${{matrix.config.cxx}}
run: cmake $GITHUB_WORKSPACE -DCMAKE_BUILD_TYPE=$BUILD_TYPE
- name: Build
working-directory: ${{runner.workspace}}/build
shell: bash
run: make LLVM_HOME=`llvm-config-${{matrix.llvm}} --bindir` LD="clang-${{matrix.llvm}} -no-pie"
- name: Test
working-directory: ${{runner.workspace}}/build
run: $GITHUB_WORKSPACE/utils/run_test.sh ${{runner.workspace}}/build