-
Notifications
You must be signed in to change notification settings - Fork 0
61 lines (50 loc) · 1.53 KB
/
ci.yml
File metadata and controls
61 lines (50 loc) · 1.53 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
59
60
61
name: CI
on:
push:
branches: [ main ]
pull_request:
branches: [ main ]
jobs:
build:
runs-on: ${{ matrix.os }}
strategy:
matrix:
include:
- os: ubuntu-latest
gcc-version: 9
- os: ubuntu-latest
gcc-version: 11
- os: macos-latest
gcc-version: 14
- os: macos-latest
gcc-version: 15
steps:
- uses: actions/checkout@v4
- name: Check helper docs
run: make check-helper-docs
- name: Install GCC ${{ matrix.gcc-version }}
if: matrix.os == 'ubuntu-latest'
run: |
sudo apt-get update
sudo apt-get install -y gcc-${{ matrix.gcc-version }} g++-${{ matrix.gcc-version }}
echo "CC=gcc-${{ matrix.gcc-version }}" >> $GITHUB_ENV
echo "CXX=g++-${{ matrix.gcc-version }}" >> $GITHUB_ENV
- name: Install GCC ${{ matrix.gcc-version }}
if: matrix.os == 'macos-latest'
run: |
brew install gcc@${{ matrix.gcc-version }}
echo "CC=gcc-${{ matrix.gcc-version }}" >> $GITHUB_ENV
echo "CXX=g++-${{ matrix.gcc-version }}" >> $GITHUB_ENV
- name: Build runtime
run: make runtime
- name: Build plugin
run: make plugin
- name: Run Tests
run: make test
- name: Install
run: sudo make install
- name: Test installation
run: |
echo '#include <ternary.h>' > test_install.c
echo 'int main() { return 0; }' >> test_install.c
$CC -I/usr/local/include/ternary -c test_install.c -o test_install.o