-
Notifications
You must be signed in to change notification settings - Fork 2
62 lines (55 loc) · 1.28 KB
/
c-cpp.yml
File metadata and controls
62 lines (55 loc) · 1.28 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
62
name: C/C++ CI
concurrency:
group: build-${{ github.ref }}
cancel-in-progress: true
on:
push:
branches: master
pull_request:
branches: master
jobs:
build:
name: ${{ matrix.build.name }}
strategy:
fail-fast: false
matrix:
build:
- name: ubuntu-20.04-gcc
os: ubuntu-20.04
cc: gcc
- name: ubuntu-20.04-clang
os: ubuntu-20.04
cc: clang
- name: ubuntu-22.04-gcc
os: ubuntu-22.04
cc: gcc
- name: ubuntu-22.04-clang
os: ubuntu-22.04
cc: clang
- name: Slackware
os: ubuntu-20.04
container: 'andy5995/slackware-build-essential:15.0'
- name: macos-latest
os: macos-latest
runs-on: ${{ matrix.build.os }}
container: ${{ matrix.build.container }}
env:
CC: '${{ matrix.build.cc }}'
steps:
- uses: actions/checkout@v3
- if: ${{ env.CC }}
run: |
if [ "$CC" = "gcc" ]; then
CXX=g++
else
CXX=clang++
fi
echo "CXX=${CXX}" >> $GITHUB_ENV
- name: Show info
run: |
export -p
echo '${{ toJSON(matrix) }}'
- name: Build
run: |
g++ --version
make