-
Notifications
You must be signed in to change notification settings - Fork 42
73 lines (69 loc) · 2.91 KB
/
build_linux.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: BUILD-LINUX-CI
on: [push, pull_request]
permissions:
checks: write
jobs:
ci:
if: >-
! contains(toJSON(github.event.commits.*.message), '[skip ci]') &&
! contains(toJSON(github.event.commits.*.message), '[skip github]')
name: LINUX-CI
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
include:
- {gen: Unix Makefiles, shared: ON, ccompiler: gcc, cxxcompiler: g++}
- {gen: Unix Makefiles, shared: OFF, ccompiler: gcc, cxxcompiler: g++}
- {gen: Unix Makefiles, shared: ON, ccompiler: clang, cxxcompiler: clang++}
- {gen: Unix Makefiles, shared: OFF, ccompiler: clang, cxxcompiler: clang++}
steps:
- name: checkout
uses: actions/checkout@v4
- name: Configure
run: |
mkdir install
cmake -G "${{matrix.gen}}" -DBUILD_SHARED_LIBS=${{matrix.shared}} "-DCMAKE_INSTALL_PREFIX=./install" -DCMAKE_CXX_COMPILER=${{matrix.cxxcompiler}} -DCMAKE_C_COMPILER=${{matrix.ccompiler}} -B build
- name: Build Release
run: |
cmake --build build --config Release --verbose
- name: Install Release
run: |
cmake --install build --config Release
cd install
ls -R
- name: Build Debug
run: |
cmake -G "${{matrix.gen}}" -DCMAKE_BUILD_TYPE=Debug -DBUILD_SHARED_LIBS=${{matrix.shared}} "-DTinyTIFF_BUILD_TESTS=OFF" -DCMAKE_CXX_COMPILER=${{matrix.cxxcompiler}} -DCMAKE_C_COMPILER=${{matrix.ccompiler}} -DCMAKE_CXX_FLAGS_DEBUG:STRING="-Wall" -DCMAKE_C_FLAGS_DEBUG:STRING="-Wall" -B build_debug
cmake --build build_debug --config Debug --verbose
- name: Test CMake-build against TinyTIFF
run: |
cd tests
cd extcmake_tinytiff_test
mkdir build
cd build
cmake -G "${{matrix.gen}}" "-DCMAKE_PREFIX_PATH=${{github.workspace}}/install/" -DCMAKE_CXX_COMPILER=${{matrix.cxxcompiler}} -DCMAKE_C_COMPILER=${{matrix.ccompiler}} -B . -S ..
cmake --build . --config Release --verbose
- name: Test CMake-build against TinyTIFF, using FetchContent-API
if: success() || failure() # always run even if the previous step fails
run: |
cd tests
cd extcmake_fetchcontent_tinytiff_test
mkdir build
cd build
cmake -G "${{matrix.gen}}" -DCMAKE_CXX_COMPILER=${{matrix.cxxcompiler}} -DCMAKE_C_COMPILER=${{matrix.ccompiler}} -B . -S ..
cmake --build . --config Release --verbose
- name: Run Release tests
run: |
cd install
cd bin
pwd
ls
export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:${{github.workspace}}/install/lib/
./tinytiffwriter_test --simple
./tinytiffreader_test --simple
- name: Publish Test Report
uses: mikepenz/action-junit-report@v4
if: success() || failure() # always run even if the previous step fails
with:
report_paths: '**/install/bin/*.xml'