Skip to content

Commit

Permalink
CI: Update
Browse files Browse the repository at this point in the history
  • Loading branch information
Iswenzz committed Sep 20, 2023
1 parent 5657fc5 commit 1e403a0
Show file tree
Hide file tree
Showing 2 changed files with 118 additions and 85 deletions.
77 changes: 51 additions & 26 deletions .github/workflows/linux.yaml
Original file line number Diff line number Diff line change
@@ -1,26 +1,51 @@
name: Linux

on:
push:
branches: [master]
pull_request:
branches: [master]

jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v2

- name: Build
run: |
mkdir build && cd build
cmake .. -DCMAKE_TOOLCHAIN_FILE=.vcpkg/linux.cmake
cmake --build .
- name: Artifact
uses: actions/upload-artifact@v2
with:
name: build-artifact
path: build
name: Linux

on:
push:
branches: [master]
pull_request:
branches: [master]

env:
BUILD_TYPE: Release

jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v2

- name: Vcpkg
uses: lukka/run-vcpkg@v11
with:
vcpkgGitCommitId: 4a600e9fea71bd7872080cbb716797e04d30e6d3

- name: Build
run: |
mkdir build && cd build
cmake .. -DCMAKE_BUILD_TYPE=${{env.BUILD_TYPE}} -DCMAKE_TOOLCHAIN_FILE=".vcpkg/linux.cmake" -DBUILD_TESTING=True
cmake --build . --config ${{env.BUILD_TYPE}}
- name: Artifact
uses: actions/upload-artifact@v2
with:
name: build-artifact
path: build

tests:
runs-on: ubuntu-latest
needs: [build]
steps:
- name: Checkout
uses: actions/checkout@v2

- name: Artifact
uses: actions/download-artifact@v2
with:
name: build-artifact
path: build

- name: Tests
run: |
ctest -C ${{env.BUILD_TYPE}}
126 changes: 67 additions & 59 deletions .github/workflows/windows.yaml
Original file line number Diff line number Diff line change
@@ -1,59 +1,67 @@
name: Windows

on:
push:
branches: [master]
pull_request:
branches: [master]

jobs:
build:
runs-on: windows-latest
steps:
- name: Checkout
uses: actions/checkout@v2

- name: Build
run: |
mkdir build && cd build
cmake .. -DCMAKE_TOOLCHAIN_FILE=.vcpkg/windows.cmake -DBUILD_TESTING=True
cmake --build .
- name: Artifact
uses: actions/upload-artifact@v2
with:
name: build-artifact
path: build

tests:
runs-on: windows-latest
needs: [build]
steps:
- name: Checkout
uses: actions/checkout@v2

- name: OpenCppCoverage
shell: bash
run: |
choco install -y opencppcoverage
echo "C:\Program Files\OpenCppCoverage" >> $GITHUB_PATH
- name: Artifact
uses: actions/download-artifact@v2
with:
name: build-artifact
path: build

- name: Tests
run: |
opencppcoverage --quiet --export_type=cobertura:opencppcoverageCoverage.xml --working_dir build --sources src -- build/bin/CoD4DM1.Tests.exe
- name: CodeCov
uses: codecov/codecov-action@v2
with:
token: ${{ secrets.CODECOV_TOKEN }}
files: ./opencppcoverageCoverage.xml
flags: unittests
name: codecov-umbrella
fail_ci_if_error: true
verbose: true
name: Windows

on:
push:
branches: [master]
pull_request:
branches: [master]

env:
BUILD_TYPE: Release

jobs:
build:
runs-on: windows-latest
steps:
- name: Checkout
uses: actions/checkout@v2

- name: Vcpkg
uses: lukka/run-vcpkg@v11
with:
vcpkgGitCommitId: 4a600e9fea71bd7872080cbb716797e04d30e6d3

- name: Build
run: |
mkdir build && cd build
cmake .. -DCMAKE_BUILD_TYPE=${{env.BUILD_TYPE}} -DCMAKE_TOOLCHAIN_FILE=".vcpkg/windows.cmake" -DBUILD_TESTING=True
cmake --build . --config ${{env.BUILD_TYPE}}
- name: Artifact
uses: actions/upload-artifact@v2
with:
name: build-artifact
path: build

tests:
runs-on: windows-latest
needs: [build]
steps:
- name: Checkout
uses: actions/checkout@v2

- name: OpenCppCoverage
shell: bash
run: |
choco install -y opencppcoverage
echo "C:\Program Files\OpenCppCoverage" >> $GITHUB_PATH
- name: Artifact
uses: actions/download-artifact@v2
with:
name: build-artifact
path: build

- name: Tests
run: |
opencppcoverage --quiet --export_type=cobertura:opencppcoverageCoverage.xml --working_dir build --sources src -- build/Release/CoD4DM1.Tests.exe
- name: CodeCov
uses: codecov/codecov-action@v2
with:
token: ${{ secrets.CODECOV_TOKEN }}
files: ./opencppcoverageCoverage.xml
flags: unittests
name: codecov-umbrella
fail_ci_if_error: true
verbose: true

0 comments on commit 1e403a0

Please sign in to comment.