-
Notifications
You must be signed in to change notification settings - Fork 0
117 lines (103 loc) · 3.18 KB
/
cmake.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
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
name: Build
on:
push:
branches: [ "main" ]
pull_request:
branches: [ "*" ]
env:
NUGET_REPOSITORY_ID: GitHubPackages
VCPKG_BINARY_SOURCES: clear;nuget,GitHubPackages,read;nugettimeout,3600
jobs:
build:
strategy:
fail-fast: false
matrix:
os: ['windows-2022', 'ubuntu-22.04']
vcpkg_library_linkage: ['dynamic', 'static']
build_type: ['Debug', 'Release']
include:
- os: 'ubuntu-22.04'
mono: 'mono'
- os: 'windows-2022'
mono: ''
- os: 'ubuntu-22.04'
vcpkg_library_linkage: 'static'
vcpkg_target_triplet: 'x64-linux'
- os: 'windows-2022'
vcpkg_library_linkage: 'dynamic'
vcpkg_target_triplet: 'x64-windows'
- os: 'windows-2022'
vcpkg_library_linkage: 'static'
vcpkg_target_triplet: 'x64-windows-static'
exclude:
- os: 'ubuntu-22.04'
vcpkg_library_linkage: 'dynamic'
runs-on: ${{ matrix.os }}
env:
VCPKG_TARGET_TRIPLET: ${{ matrix.vcpkg_target_triplet }}
BUILD_TYPE: ${{ matrix.build_type }}
permissions:
contents: read
packages: read
steps:
- name: Install Ubuntu dependencies
if: ${{ matrix.os == 'ubuntu-22.04' }}
shell: bash
run: |
sudo apt-get install autoconf-archive
sudo apt-get install '^libxcb.*-dev' \
libx11-xcb-dev libglu1-mesa-dev libxrender-dev libxi-dev libxkbcommon-dev \
libxkbcommon-x11-dev
sudo apt-get install libgl1-mesa-dev mesa-common-dev
- name: Checkout Repository
uses: actions/checkout@v3
with:
submodules: 'recursive'
- name: Setup NuGet
shell: pwsh
run: |
nuget sources add `
-source "https://nuget.pkg.github.com/PurpleFlowerGarden/index.json" `
-storepasswordincleartext `
-name "${env:NUGET_REPOSITORY_ID}" `
-username "${{ github.repository_owner }}" `
-password "${{ secrets.GITHUB_TOKEN }}"
nuget setapikey `
"${{ secrets.GITHUB_TOKEN }}" `
-source "${env:NUGET_REPOSITORY_ID}"
nuget sources
- name: Build
shell: pwsh
run: ./build.ps1
- name: Run Tests
shell: pwsh
run: pwsh ./test.ps1
- name: Create Test Result Artifact
if: always()
uses: actions/upload-artifact@v3
with:
name: Test Results (${{ matrix.vcpkg_target_triplet }})
path: |
build/*.xml
publish-teshresults:
name: Publish Test Results
needs: build
if: >
always() &&
github.event.sender.login != 'dependabot[bot]' &&
( github.event_name != 'pull_request' || github.event.pull_request.head.repo.full_name == github.repository )
runs-on: ubuntu-latest
permissions:
checks: write
pull-requests: write
steps:
- name: Download Artifacts
uses: actions/download-artifact@v3
with:
path: artifacts
- name: Publish Test Results
uses: EnricoMi/publish-unit-test-result-action@v2
if: always()
with:
files: |
artifacts/**/*.xml