-
Notifications
You must be signed in to change notification settings - Fork 60
123 lines (119 loc) · 4.33 KB
/
actions.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
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
name: actions
on:
push:
branches: [main, master]
pull_request:
branches: [main, master]
schedule:
- cron: '0 8 * * *'
jobs:
build:
runs-on: ${{ matrix.config.vm_image }}
strategy:
fail-fast: false
matrix:
config:
- name: GCC 11 Ubuntu
compiler: gcc
compiler_version: 11
make: make
mode: release
os: ubuntu
vm_image: ubuntu-20.04
test_autodetect_members: 0
with_zpp_throwing: 0
- name: GCC 12 Ubuntu
compiler: gcc
compiler_version: 12
make: make
mode: release
os: ubuntu
vm_image: ubuntu-22.04
test_autodetect_members: 0
with_zpp_throwing: 0
- name: Clang 12 Ubuntu
compiler: clang
compiler_version: 12
make: make
mode: release
os: ubuntu
vm_image: ubuntu-20.04
test_autodetect_members: 0
with_zpp_throwing: 1
- name: Clang 13 Ubuntu
compiler: clang
compiler_version: 13
make: make
mode: release
os: ubuntu
vm_image: ubuntu-20.04
test_autodetect_members: 1
with_zpp_throwing: 1
- name: Clang 21 Ubuntu
compiler: clang
compiler_version: 21
make: make
mode: release
os: ubuntu
vm_image: ubuntu-24.04
test_autodetect_members: 0
with_zpp_throwing: 1
- name: Clang 17 MacOS
compiler: clang
compiler_version: 17
make: gmake
mode: release
os: macos
vm_image: macos-15
test_autodetect_members: 0
with_zpp_throwing: 1
- name: Clang 18 MacOS
compiler: clang
compiler_version: 18
make: gmake
mode: release
os: macos
vm_image: macos-15
test_autodetect_members: 1
with_zpp_throwing: 1
env:
DEBIAN_FRONTEND: noninteractive
ASAN_OPTIONS: 'alloc_dealloc_mismatch=0'
steps:
- uses: actions/checkout@v2
with:
submodules: true
- name: 'install (ubuntu, clang)'
if: matrix.config.os == 'ubuntu' && matrix.config.compiler == 'clang'
run: |
curl -fLo llvm.sh https://apt.llvm.org/llvm.sh
chmod +x ./llvm.sh
sudo ./llvm.sh ${{ matrix.config.compiler_version }} all
sudo apt install -y libc++-${{ matrix.config.compiler_version }}-dev libc++abi-${{ matrix.config.compiler_version }}-dev libunwind-${{ matrix.config.compiler_version }}-dev
sudo update-alternatives --install /usr/bin/clang++ clang++ /usr/bin/clang++-${{ matrix.config.compiler_version }} ${{ matrix.config.compiler_version }}00
- name: 'install (ubuntu, gcc)'
if: matrix.config.os == 'ubuntu' && matrix.config.compiler == 'gcc'
run: |
sudo add-apt-repository -y ppa:ubuntu-toolchain-r/test
sudo apt install gcc-${{ matrix.config.compiler_version }} g++-${{ matrix.config.compiler_version }}
- name: 'install (macos)'
if: matrix.config.os == 'macos'
run: |
brew install llvm@${{ matrix.config.compiler_version }} make
echo "PATH=/usr/local/opt/llvm@${{ matrix.config.compiler_version }}/bin:/usr/local/opt/llvm/bin:$PATH" >> $GITHUB_ENV
- name: 'install (zpp_throwing)'
if: matrix.config.with_zpp_throwing == '1'
run: |
git clone https://github.com/eyalz800/zpp_throwing ../zpp_throwing
- name: 'configure (gcc, libstdc++)'
if: matrix.config.compiler == 'gcc'
run: |
sed -i 's/-stdlib=libc++//g' ./test/zpp_project.mk
sed -i 's/ZPP_CC .*/ZPP_CC := g++-${{ matrix.config.compiler_version }}/g' ./test/zpp_project.mk
sed -i 's/ZPP_CXX .*/ZPP_CXX := g++-${{ matrix.config.compiler_version }}/g' ./test/zpp_project.mk
- name: 'compile'
run: |
${{ matrix.config.make }} -C test -f zpp.mk -j mode=${{ matrix.config.mode }} ZPP_BITS_AUTODETECT_MEMBERS_MODE=${{ matrix.config.test_autodetect_members }}
- name: 'test'
run: |
./test/out/${{ matrix.config.mode }}/default/output