Skip to content

Commit 6aa1627

Browse files
committed
CI: add a target with older Ubuntu to test older compilers
1 parent 2203527 commit 6aa1627

File tree

1 file changed

+140
-0
lines changed

1 file changed

+140
-0
lines changed
Lines changed: 140 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,140 @@
1+
name: "Linux"
2+
on:
3+
push:
4+
branches: [ master ]
5+
pull_request:
6+
# branches: [ master ]
7+
8+
jobs:
9+
Linux-GCC:
10+
runs-on: ubuntu-20.04
11+
strategy:
12+
matrix:
13+
cxx: ['g++-9', 'llvm-12']
14+
env:
15+
CMAKE_OPTIONS: -DDEV_MODE=ON -DBUILD_TESTING=ON
16+
CMAKE_MATROSKA_OPTIONS: -DBUILD_EXAMPLES=ON
17+
CXX: ${{matrix.cxx}}
18+
steps:
19+
- name: list compilers
20+
run: dpkg --list | grep compiler
21+
22+
- name: Get pushed code
23+
uses: actions/checkout@v4
24+
25+
- name: Checkout libebml
26+
uses: actions/checkout@v4
27+
with:
28+
repository: Matroska-Org/libebml
29+
path: libebml
30+
# minimum version we support ref: 'release-1.4.3'
31+
32+
- name: Configure libebml
33+
run: cmake -S libebml -B libebml/_build ${{ env.CMAKE_OPTIONS }}
34+
35+
- name: Build libebml
36+
run: cmake --build libebml/_build --parallel
37+
38+
- name: Install libebml
39+
run: cmake --install libebml/_build --prefix ${GITHUB_WORKSPACE}/_built
40+
41+
- name: Configure
42+
run: cmake -S . -B _build ${{ env.CMAKE_OPTIONS }} ${{ env.CMAKE_MATROSKA_OPTIONS }} -DEBML_DIR="${GITHUB_WORKSPACE}/_built/lib/cmake/EBML"
43+
44+
- name: Build
45+
run: cmake --build _build --parallel
46+
47+
- name: Test installation
48+
run: cmake --install _build --prefix ${GITHUB_WORKSPACE}/_built
49+
50+
Linux-Clang:
51+
runs-on: ubuntu-20.04
52+
strategy:
53+
matrix:
54+
cxx: ['7', '18']
55+
env:
56+
CMAKE_OPTIONS: -DDEV_MODE=ON -DBUILD_TESTING=ON -DCMAKE_CXX_FLAGS="-stdlib=libc++"
57+
CMAKE_MATROSKA_OPTIONS: -DBUILD_EXAMPLES=ON
58+
steps:
59+
- uses: egor-tensin/setup-clang@v1
60+
with:
61+
version: ${{matrix.cxx}}
62+
63+
- name: Install libc++
64+
run: |
65+
sudo apt install -y libc++abi-${{matrix.cxx}}-dev libc++-${{matrix.cxx}}-dev
66+
67+
- name: Get pushed code
68+
uses: actions/checkout@v4
69+
70+
- name: Checkout libebml
71+
uses: actions/checkout@v4
72+
with:
73+
repository: Matroska-Org/libebml
74+
path: libebml
75+
# minimum version we support ref: 'release-1.4.3'
76+
77+
- name: Configure libebml
78+
run: cmake -S libebml -B libebml/_build ${{ env.CMAKE_OPTIONS }}
79+
80+
- name: Build libebml
81+
run: cmake --build libebml/_build --parallel
82+
83+
- name: Install libebml
84+
run: cmake --install libebml/_build --prefix ${GITHUB_WORKSPACE}/_built
85+
86+
- name: Configure
87+
run: cmake -S . -B _build ${{ env.CMAKE_OPTIONS }} ${{ env.CMAKE_MATROSKA_OPTIONS }} -DEBML_DIR="${GITHUB_WORKSPACE}/_built/lib/cmake/EBML"
88+
89+
- name: Build
90+
run: cmake --build _build --parallel
91+
92+
- name: Test installation
93+
run: cmake --install _build --prefix ${GITHUB_WORKSPACE}/_built
94+
95+
Alpine:
96+
runs-on: ubuntu-latest
97+
strategy:
98+
matrix:
99+
platform: ['armhf']
100+
env:
101+
CMAKE_OPTIONS: -DDEV_MODE=ON -DBUILD_TESTING=ON
102+
CMAKE_MATROSKA_OPTIONS: -DBUILD_EXAMPLES=ON
103+
defaults:
104+
run:
105+
shell: alpine.sh {0}
106+
steps:
107+
- name: Get pushed code
108+
uses: actions/checkout@v4
109+
110+
- uses: jirutka/setup-alpine@v1
111+
with:
112+
branch: edge
113+
arch: ${{matrix.platform}}
114+
packages: >
115+
build-base cmake
116+
117+
- name: Checkout libebml
118+
uses: actions/checkout@v4
119+
with:
120+
repository: Matroska-Org/libebml
121+
path: libebml
122+
# minimum version we support ref: 'release-1.4.3'
123+
124+
- name: Configure libebml
125+
run: cmake -S libebml -B libebml/_build ${{ env.CMAKE_OPTIONS }}
126+
127+
- name: Build libebml
128+
run: cmake --build libebml/_build --parallel
129+
130+
- name: Install libebml
131+
run: cmake --install libebml/_build --prefix ${GITHUB_WORKSPACE}/_built
132+
133+
- name: Configure
134+
run: cmake -S . -B _build ${{ env.CMAKE_OPTIONS }} ${{ env.CMAKE_MATROSKA_OPTIONS }} -DEBML_DIR="${GITHUB_WORKSPACE}/_built/lib/cmake/EBML"
135+
136+
- name: Build
137+
run: cmake --build _build --parallel
138+
139+
- name: Test installation
140+
run: cmake --install _build --prefix ${GITHUB_WORKSPACE}/_built

0 commit comments

Comments
 (0)