-
Notifications
You must be signed in to change notification settings - Fork 15
60 lines (50 loc) · 1.86 KB
/
tests.yaml
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
name: Tests
on: push
defaults:
run:
shell: powershell
jobs:
release:
name: Run tests
runs-on: windows-2022
steps:
- name: Set Short Sha
run: |
echo "git_sha=$('${{github.sha}}'.Substring(0, 7))" >> $env:GITHUB_ENV
- name: Set Version Information - Main
if: ${{startsWith(github.ref, 'refs/tags/v')}}
run: |
echo "pbom_version=$('${{github.ref}}' -replace 'refs/tags/v','')" >> $env:GITHUB_ENV
echo "pbom_build_number=${{github.run_number}} (${{env.git_sha}})" >> $env:GITHUB_ENV
- name: Set Version Information - Branch
if: ${{startsWith(github.ref, 'refs/heads/')}}
run: |
echo "pbom_version=$('${{github.ref}}' -replace 'refs/heads/','' -replace '[^\w\d]','_')" >> $env:GITHUB_ENV
echo "pbom_build_number=${{github.run_number}} (${{env.git_sha}})" >> $env:GITHUB_ENV
- name: Install MSVC 2022
uses: ilammy/msvc-dev-cmd@v1
with:
arch: x64
- name: Install Qt6
uses: jurplel/install-qt-action@v3
with:
version: '6.6.1'
host: windows
target: desktop
arch: win64_msvc2019_64
dir: ${{github.workspace}}
- name: Checkout
uses: actions/checkout@v3
with:
path: code
submodules: true
- name: CMake Cache
run: |
cmake -S ${{github.workspace}}\code\ -B ${{github.workspace}}\_build\ `
-G Ninja -DCMAKE_BUILD_TYPE=Release `
-DPBOM_BUILD_NUMBER:STRING="${{env.pbom_build_number}}" `
-DPBOM_VERSION:STRING="${{env.pbom_version}}"
- name: CMake Build
run: cmake --build ${{github.workspace}}\_build\
- name: Run Tests
run: ${{github.workspace}}\_build\pbom\pbom_test.exe