-
Notifications
You must be signed in to change notification settings - Fork 175
95 lines (77 loc) · 2.32 KB
/
build-and-test.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
name: Build and Test
on:
push:
branches: [ master, develop, release ]
pull_request:
branches: [ master, develop, release ]
env:
OMP_NUM_THREADS: 1
BUILD_HOME: build
TEST_HOME: nrtests
PACKAGE_NAME: vcpkg-export-20240724-151754.1.0.0
PKG_NAME: vcpkg-export-20240724-151754
jobs:
unit_test:
name: Build and unit test
runs-on: windows-2019
environment: testing
defaults:
run:
shell: cmd
steps:
- name: Checkout repo
uses: actions/checkout@v4
- name: Install boost-test
env:
REMOTE_STORE: "https://nuget.pkg.github.com/USEPA/index.json"
USERNAME: michaeltryby
run: |
nuget sources add -Name github -Source ${{ env.REMOTE_STORE }} -Username ${{ env.USERNAME }} -Password ${{ secrets.ACCESS_TOKEN }}
nuget install ${{env.PKG_NAME}} -Source github
- name: Build
env:
TOOL_CHAIN_PATH: \scripts\buildsystems\vcpkg.cmake
run: |
cmake -B.\build -DBUILD_TESTS=ON -DCMAKE_TOOLCHAIN_FILE=.\${{env.PACKAGE_NAME}}${{env.TOOL_CHAIN_PATH}} .
cmake --build .\build --config DEBUG
- name: Unit Test
run: ctest --test-dir .\build -C Debug --output-on-failure
reg_test:
name: Build and reg test
runs-on: windows-2019
defaults:
run:
shell: cmd
working-directory: ci-tools/windows
steps:
- name: Checkout swmm repo
uses: actions/checkout@v4
- name: Checkout ci-tools repo
uses: actions/checkout@v4
with:
repository: USEPA/swmm-ci-tools
ref: master
path: ci-tools
- name: Setup python
uses: actions/setup-python@v5
with:
python-version: '3.11'
- name: Install requirements
run: |
python -m pip install --upgrade pip
python -m pip install -r requirements-swmm.txt
- name: Build
run: make.cmd /g "Visual Studio 16 2019"
- name: Before reg test
env:
NRTESTS_URL: https://github.com/USEPA/swmm-nrtestsuite
BENCHMARK_TAG: v2.5.0-dev
run: before-nrtest.cmd ${{ env.BENCHMARK_TAG }}
- name: Run reg test
run: run-nrtests.cmd %GITHUB_RUN_ID%_%GITHUB_RUN_NUMBER%
- name: Upload artifacts
if: ${{ always() }}
uses: actions/upload-artifact@v4
with:
name: build-test-artifacts
path: upload/*.*