-
Notifications
You must be signed in to change notification settings - Fork 0
73 lines (66 loc) · 1.45 KB
/
c-cpp.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
name: Linux
concurrency:
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.sha }}
cancel-in-progress: true
on:
push:
branches: main
paths:
- '**'
- '!**.yml'
- '!**.md'
- '**/c-cpp.yml'
pull_request:
branches: main
paths:
- '**'
- '!**.yml'
- '!/**.md'
- '**/c-cpp.yml'
jobs:
build:
name: ${{ matrix.build.name }}
strategy:
fail-fast: false
matrix:
build:
- name: ubuntu-22.04-gcc-
os: ubuntu-22.04
cc: gcc
#- name: ubuntu-22.04-clang
#os: ubuntu-22.04
#cc: clang
runs-on: ${{ matrix.build.os }}
container: ${{ matrix.build.container }}
env:
CC: '${{ matrix.build.cc }}'
NETPANZER_DATADIR: ${{ github.workspace }}/data
steps:
- uses: actions/checkout@v4
with:
submodules: false
- 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: Install dependencies
run: |
sudo apt update
sudo apt remove -y firefox
sudo apt upgrade -y
sudo apt install -y \
libboost-dev \
libclanlib-dev \
ruby-dev \
scons
- name: Build with scons
run: |
scons