Skip to content

Commit 1e403a0

Browse files
committed
CI: Update
1 parent 5657fc5 commit 1e403a0

File tree

2 files changed

+118
-85
lines changed

2 files changed

+118
-85
lines changed

.github/workflows/linux.yaml

+51-26
Original file line numberDiff line numberDiff line change
@@ -1,26 +1,51 @@
1-
name: Linux
2-
3-
on:
4-
push:
5-
branches: [master]
6-
pull_request:
7-
branches: [master]
8-
9-
jobs:
10-
build:
11-
runs-on: ubuntu-latest
12-
steps:
13-
- name: Checkout
14-
uses: actions/checkout@v2
15-
16-
- name: Build
17-
run: |
18-
mkdir build && cd build
19-
cmake .. -DCMAKE_TOOLCHAIN_FILE=.vcpkg/linux.cmake
20-
cmake --build .
21-
22-
- name: Artifact
23-
uses: actions/upload-artifact@v2
24-
with:
25-
name: build-artifact
26-
path: build
1+
name: Linux
2+
3+
on:
4+
push:
5+
branches: [master]
6+
pull_request:
7+
branches: [master]
8+
9+
env:
10+
BUILD_TYPE: Release
11+
12+
jobs:
13+
build:
14+
runs-on: ubuntu-latest
15+
steps:
16+
- name: Checkout
17+
uses: actions/checkout@v2
18+
19+
- name: Vcpkg
20+
uses: lukka/run-vcpkg@v11
21+
with:
22+
vcpkgGitCommitId: 4a600e9fea71bd7872080cbb716797e04d30e6d3
23+
24+
- name: Build
25+
run: |
26+
mkdir build && cd build
27+
cmake .. -DCMAKE_BUILD_TYPE=${{env.BUILD_TYPE}} -DCMAKE_TOOLCHAIN_FILE=".vcpkg/linux.cmake" -DBUILD_TESTING=True
28+
cmake --build . --config ${{env.BUILD_TYPE}}
29+
30+
- name: Artifact
31+
uses: actions/upload-artifact@v2
32+
with:
33+
name: build-artifact
34+
path: build
35+
36+
tests:
37+
runs-on: ubuntu-latest
38+
needs: [build]
39+
steps:
40+
- name: Checkout
41+
uses: actions/checkout@v2
42+
43+
- name: Artifact
44+
uses: actions/download-artifact@v2
45+
with:
46+
name: build-artifact
47+
path: build
48+
49+
- name: Tests
50+
run: |
51+
ctest -C ${{env.BUILD_TYPE}}

.github/workflows/windows.yaml

+67-59
Original file line numberDiff line numberDiff line change
@@ -1,59 +1,67 @@
1-
name: Windows
2-
3-
on:
4-
push:
5-
branches: [master]
6-
pull_request:
7-
branches: [master]
8-
9-
jobs:
10-
build:
11-
runs-on: windows-latest
12-
steps:
13-
- name: Checkout
14-
uses: actions/checkout@v2
15-
16-
- name: Build
17-
run: |
18-
mkdir build && cd build
19-
cmake .. -DCMAKE_TOOLCHAIN_FILE=.vcpkg/windows.cmake -DBUILD_TESTING=True
20-
cmake --build .
21-
22-
- name: Artifact
23-
uses: actions/upload-artifact@v2
24-
with:
25-
name: build-artifact
26-
path: build
27-
28-
tests:
29-
runs-on: windows-latest
30-
needs: [build]
31-
steps:
32-
- name: Checkout
33-
uses: actions/checkout@v2
34-
35-
- name: OpenCppCoverage
36-
shell: bash
37-
run: |
38-
choco install -y opencppcoverage
39-
echo "C:\Program Files\OpenCppCoverage" >> $GITHUB_PATH
40-
41-
- name: Artifact
42-
uses: actions/download-artifact@v2
43-
with:
44-
name: build-artifact
45-
path: build
46-
47-
- name: Tests
48-
run: |
49-
opencppcoverage --quiet --export_type=cobertura:opencppcoverageCoverage.xml --working_dir build --sources src -- build/bin/CoD4DM1.Tests.exe
50-
51-
- name: CodeCov
52-
uses: codecov/codecov-action@v2
53-
with:
54-
token: ${{ secrets.CODECOV_TOKEN }}
55-
files: ./opencppcoverageCoverage.xml
56-
flags: unittests
57-
name: codecov-umbrella
58-
fail_ci_if_error: true
59-
verbose: true
1+
name: Windows
2+
3+
on:
4+
push:
5+
branches: [master]
6+
pull_request:
7+
branches: [master]
8+
9+
env:
10+
BUILD_TYPE: Release
11+
12+
jobs:
13+
build:
14+
runs-on: windows-latest
15+
steps:
16+
- name: Checkout
17+
uses: actions/checkout@v2
18+
19+
- name: Vcpkg
20+
uses: lukka/run-vcpkg@v11
21+
with:
22+
vcpkgGitCommitId: 4a600e9fea71bd7872080cbb716797e04d30e6d3
23+
24+
- name: Build
25+
run: |
26+
mkdir build && cd build
27+
cmake .. -DCMAKE_BUILD_TYPE=${{env.BUILD_TYPE}} -DCMAKE_TOOLCHAIN_FILE=".vcpkg/windows.cmake" -DBUILD_TESTING=True
28+
cmake --build . --config ${{env.BUILD_TYPE}}
29+
30+
- name: Artifact
31+
uses: actions/upload-artifact@v2
32+
with:
33+
name: build-artifact
34+
path: build
35+
36+
tests:
37+
runs-on: windows-latest
38+
needs: [build]
39+
steps:
40+
- name: Checkout
41+
uses: actions/checkout@v2
42+
43+
- name: OpenCppCoverage
44+
shell: bash
45+
run: |
46+
choco install -y opencppcoverage
47+
echo "C:\Program Files\OpenCppCoverage" >> $GITHUB_PATH
48+
49+
- name: Artifact
50+
uses: actions/download-artifact@v2
51+
with:
52+
name: build-artifact
53+
path: build
54+
55+
- name: Tests
56+
run: |
57+
opencppcoverage --quiet --export_type=cobertura:opencppcoverageCoverage.xml --working_dir build --sources src -- build/Release/CoD4DM1.Tests.exe
58+
59+
- name: CodeCov
60+
uses: codecov/codecov-action@v2
61+
with:
62+
token: ${{ secrets.CODECOV_TOKEN }}
63+
files: ./opencppcoverageCoverage.xml
64+
flags: unittests
65+
name: codecov-umbrella
66+
fail_ci_if_error: true
67+
verbose: true

0 commit comments

Comments
 (0)