-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #117 from imperialCHEPI/consolidate_ci_configs
Consolidate Windows and Linux CI config files
- Loading branch information
Showing
5 changed files
with
108 additions
and
239 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,93 @@ | ||
name: CI | ||
|
||
on: | ||
push: | ||
branches: [ main ] | ||
release: | ||
types: [published] | ||
branches: [ main ] | ||
pull_request: | ||
workflow_dispatch: | ||
|
||
jobs: | ||
build: | ||
name: Build and test | ||
runs-on: ${{ matrix.os }} | ||
strategy: | ||
fail-fast: false | ||
matrix: | ||
os: [ ubuntu-22.04, windows-2022 ] | ||
include: | ||
- os: ubuntu-22.04 | ||
platform: linux | ||
- os: windows-2022 | ||
platform: windows | ||
|
||
env: | ||
VCPKG_ROOT: 'vcpkg' | ||
VCPKG_BINARY_SOURCES: 'clear;nuget,GitHub,readwrite' | ||
|
||
steps: | ||
- uses: actions/checkout@v3 | ||
|
||
- name: Set up MSVC (Windows) | ||
if: matrix.os == 'windows-2022' | ||
uses: ilammy/msvc-dev-cmd@v1 | ||
with: | ||
arch: x64 | ||
|
||
- name: Install dependencies (Linux) | ||
if: matrix.os == 'ubuntu-22.04' | ||
run: | | ||
sudo apt update | ||
sudo apt upgrade -y | ||
sudo apt install --no-install-recommends build-essential libtbb-dev ninja-build doxygen graphviz | ||
- name: Install VCPKG | ||
run: | | ||
git clone https://github.com/Microsoft/vcpkg.git | ||
cd vcpkg | ||
./bootstrap-vcpkg.sh -disableMetrics | ||
- name: Build HealthGPS (debug) | ||
run: | | ||
cmake --preset=${{ matrix.platform }}-debug -DBUILD_BENCHMARKS=ON | ||
cmake --build --preset=debug-build-${{ matrix.platform }} --target=install | ||
- name: Build HealthGPS (release) | ||
run: | | ||
cmake --preset=${{ matrix.platform }}-release -DBUILD_BENCHMARKS=ON | ||
cmake --build --preset=release-build-${{ matrix.platform }} --target=install | ||
- name: Upload artifacts | ||
uses: actions/upload-artifact@v3 | ||
with: | ||
name: health-gps-${{ matrix.platform }} | ||
path: | | ||
${{ github.workspace }}/out/install/${{ matrix.platform }}-*/* | ||
- name: Run tests | ||
run: ctest --preset=core-test-${{ matrix.platform }} | ||
|
||
- name: Zip output folder | ||
if: startsWith(github.ref, 'refs/tags/') | ||
working-directory: ${{github.workspace}}/out/install/${{ matrix.platform }}-release/bin/ | ||
run: | | ||
mkdir ${{github.workspace}}/artifact | ||
7z a -tzip ${{github.workspace}}/artifact/health_gps_${{ matrix.platform }}.zip *.dll *.Console* | ||
- name: Upload release artifacts | ||
if: startsWith(github.ref, 'refs/tags/') | ||
uses: softprops/action-gh-release@v1 | ||
with: | ||
files: artifact/health_gps_${{ matrix.platform }}.zip | ||
|
||
- name: Doxygen release API deploy | ||
if: matrix.platform == 'linux' && startsWith(github.ref, 'refs/tags/') | ||
uses: peaceiris/actions-gh-pages@v3 | ||
with: | ||
github_token: ${{ secrets.GITHUB_TOKEN }} | ||
publish_dir: ${{github.workspace}}/out/build/${{env.RELEASE_PRESET}}/src/html | ||
destination_dir: html | ||
enable_jekyll: true | ||
commit_message: ${{ github.ref_name }} - ${{ github.event.head_commit.message }} |
This file was deleted.
Oops, something went wrong.
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.