-
Notifications
You must be signed in to change notification settings - Fork 22
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
updated CI-pipline to Github Actions
- Loading branch information
Showing
9 changed files
with
268 additions
and
214 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,70 @@ | ||
# This is a basic workflow to help you get started with Actions | ||
|
||
name: Doxygen build&deploy | ||
|
||
# Controls when the workflow will run | ||
on: | ||
# Triggers the workflow on push or pull request events but only for the master branch | ||
push: | ||
branches: [ master ] | ||
|
||
# Allows you to run this workflow manually from the Actions tab | ||
workflow_dispatch: | ||
|
||
# A workflow run is made up of one or more jobs that can run sequentially or in parallel | ||
jobs: | ||
# This workflow contains a single job called "build" | ||
build: | ||
# The type of runner that the job will run on | ||
runs-on: ubuntu-20.04 | ||
|
||
# Steps represent a sequence of tasks that will be executed as part of the job | ||
steps: | ||
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it | ||
- name: checkout | ||
uses: actions/checkout@v4 | ||
|
||
- name: Install dependencies | ||
run: | | ||
sudo apt-get update | ||
sudo apt-get update --fix-missing | ||
sudo apt-get install -f | ||
sudo apt -y install build-essential doxygen graphviz doxygen-latex libclang-common-10-dev libclang-10-dev fonts-freefont-ttf | ||
doxygen -v | ||
- name: Update Doxygen to 1.9.8 | ||
run: | | ||
currDir=`pwd` | ||
cd $GITHUB_WORKSPACE | ||
mkdir doxygen | ||
wget -O - https://github.com/doxygen/doxygen/releases/download/Release_1_9_8/doxygen-1.9.8.linux.bin.tar.gz | tar --strip-components=1 -xz -C doxygen | ||
export PATH=$GITHUB_WORKSPACE/doxygen/bin:${PATH} | ||
echo PATH=$PATH | ||
cd $currDir | ||
$GITHUB_WORKSPACE/doxygen/bin/doxygen --version | ||
- name: Run Doxygen | ||
run: | | ||
$GITHUB_WORKSPACE/doxygen/bin/doxygen --version | ||
cd doc | ||
pwd | ||
ls | ||
$GITHUB_WORKSPACE/doxygen/bin/doxygen | ||
pwd | ||
ls | ||
ls -R | ||
- name: Create .nojekyll (ensures pages with underscores work on gh pages) | ||
run: | | ||
pwd | ||
touch doc/html/.nojekyll | ||
shell: bash | ||
|
||
- name: 🚀 Deploy to Github-Pages | ||
uses: JamesIves/github-pages-deploy-action@v4 | ||
with: | ||
#github_token: ${{ secrets.GH_PAGES_SECRET }} | ||
ssh-key: ${{ secrets.TINYMAT_DEPLOY_KEY }} | ||
branch: gh-pages | ||
folder: doc/html | ||
|
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,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}} "-DTinyMAT_BUILD_EXAMPLES=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 TinyMAT | ||
run: | | ||
cd examples | ||
cd extcmake_tinymat_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 TinyMAT, using FetchContent-API | ||
# if: success() || failure() # always run even if the previous step fails | ||
# run: | | ||
# cd examples | ||
# 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' |
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,70 @@ | ||
name: BUILD-MSVC-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: MSVC 2022 | ||
runs-on: windows-latest | ||
strategy: | ||
fail-fast: false | ||
matrix: | ||
include: | ||
- {gen: Visual Studio 17 2022, arch: Win32, shared: ON} | ||
- {gen: Visual Studio 17 2022, arch: Win32, shared: OFF} | ||
- {gen: Visual Studio 17 2022, arch: x64, shared: ON} | ||
- {gen: Visual Studio 17 2022, arch: x64, shared: OFF} | ||
steps: | ||
- name: checkout | ||
uses: actions/checkout@v4 | ||
- name: Configure | ||
run: | | ||
mkdir install | ||
cmake -G "${{matrix.gen}}" -A ${{matrix.arch}} -DBUILD_SHARED_LIBS=${{matrix.shared}} "-DCMAKE_INSTALL_PREFIX=./install" -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 TinyMAT | ||
run: | | ||
cd examples | ||
cd extcmake_tinymat_test | ||
mkdir build | ||
cd build | ||
pwd | ||
echo ${{github.workspace}} | ||
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 TinyMAT, using FetchContent-API | ||
# if: success() || failure() # always run even if the previous step fails | ||
# run: | | ||
# cd examples | ||
# cd extcmake_tinymat_test | ||
# mkdir 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,51 @@ | ||
name: "MSVC-CodeAnalysis" | ||
|
||
on: [push, pull_request] | ||
|
||
|
||
env: | ||
# Path to the CMake build directory. | ||
build: '${{ github.workspace }}/build' | ||
config: 'Debug' | ||
|
||
jobs: | ||
analyze: | ||
name: Analyze | ||
runs-on: windows-latest | ||
|
||
steps: | ||
- name: Checkout repository | ||
uses: actions/checkout@v2 | ||
|
||
- name: Configure CMake | ||
run: cmake -B ${{ env.build }} -DCMAKE_BUILD_TYPE=${{ env.config }} "-DTinyMAT_BUILD_SHARED_LIBS:BOOL=OFF" "-DTinyMAT_BUILD_STATIC_LIBS:BOOL=ON" "-DBUILD_SHARED_LIBS:BOOL=ON" "-DTinyMAT_BUILD_EXAMPLES:BOOL=OFF" | ||
|
||
- name: Build CMake | ||
run: cmake --build ${{ env.build }} --config ${{ env.config }} | ||
|
||
- name: Run MSVC Code Analysis | ||
uses: microsoft/[email protected] | ||
# Provide a unique ID to access the sarif output path | ||
id: run-analysis | ||
with: | ||
cmakeBuildDirectory: ${{ env.build }} | ||
buildConfiguration: ${{ env.config }} | ||
# Ruleset file that will determine what checks will be run | ||
ruleset: NativeRecommendedRules.ruleset | ||
# Paths to ignore analysis of CMake targets and includes | ||
# ignoredPaths: ${{ github.workspace }}/dependencies;${{ github.workspace }}/test | ||
|
||
# Upload SARIF file to GitHub Code Scanning Alerts | ||
- name: Upload SARIF to GitHub | ||
uses: github/codeql-action/upload-sarif@v2 | ||
with: | ||
sarif_file: ${{ steps.run-analysis.outputs.sarif }} | ||
|
||
# Upload SARIF file as an Artifact to download and view | ||
- name: Upload SARIF as an Artifact | ||
uses: actions/upload-artifact@v2 | ||
with: | ||
name: sarif-file | ||
path: ${{ steps.run-analysis.outputs.sarif }} | ||
|
||
|
This file was deleted.
Oops, something went wrong.
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
Oops, something went wrong.