-
Notifications
You must be signed in to change notification settings - Fork 42
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
add build-action for Linux with gcc and clang
- Loading branch information
Showing
2 changed files
with
73 additions
and
5 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,68 @@ | ||
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: Test CMake-build against TinyTIFF | ||
run: | | ||
cd tests | ||
cd extcmake_tinytiff_test | ||
md build | ||
cd build | ||
cmake -G "${{matrix.gen}}" -A ${{matrix.arch}} "-DCMAKE_PREFIX_PATH=${{github.workspace}}/install/" -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 | ||
md build | ||
cd build | ||
cmake -G "${{matrix.gen}}" -A ${{matrix.arch}} -B . -S .. | ||
cmake --build . --config Release --verbose | ||
- name: Run Release tests | ||
run: | | ||
cd install | ||
cd bin | ||
pwd | ||
ls | ||
.\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' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters