forked from debrouxl/tilibs
-
Notifications
You must be signed in to change notification settings - Fork 0
61 lines (52 loc) · 2.17 KB
/
build.windows.workflow.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
name: Build Windows
on:
push:
branches: [ master, experimental, experimental2 ]
pull_request:
branches: [ master, experimental, experimental2 ]
release:
types: [published]
jobs:
build:
name: "Build: ${{ matrix.arch }} ${{ matrix.os }}"
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os: [windows-2022]
arch: [x86,x64]
config: [Release]
steps:
- name: Remove Perl Strawberry installation
# Removes conflicting headers from include paths
run: |
Remove-Item -Recurse -Force C:/Strawberry
- name: Checkout Git Repo
uses: actions/checkout@v4
with:
submodules: 'recursive'
- name: Install latest CMake
uses: lukka/get-cmake@a70f1cfa1857a3eecfe0d34962269e1b1e8be56c # latest as of 2024-08-08
- name: Restore artifacts, or setup vcpkg (do not install any package)
uses: lukka/run-vcpkg@d87e7fac99f22776a4973d7e413921ea254c1fc9 # latest as of 2024-08-08
- name: create install folder
run: |
mkdir "${{ github.workspace }}/tilibs.build/Win-${{ matrix.arch }}/prefix"
- name: Build and install tilibs ${{ matrix.config }} on Win ${{ matrix.arch }}
uses: lukka/run-cmake@4b1adc1944be8367be9f4e08303ce49918db8e3c # latest as of 2024-08-08
with:
cmakeListsTxtPath: '${{ github.workspace }}/CMakeLists.txt'
configurePreset: 'Win-${{ matrix.arch }}'
configurePresetAdditionalArgs: "['-DDEPS_RELEASE_ONLY=ON']"
buildPreset: 'Win-${{ matrix.arch }}-${{ matrix.config }}'
buildPresetAdditionalArgs: "['--target', 'check', 'install']"
env:
CMAKE_INSTALL_PREFIX_OVERRIDE: ${{ github.workspace }}/tilibs.build/Win-${{ matrix.arch }}/prefix
VCPKG_DEFAULT_TRIPLET: ${{ matrix.arch }}-windows
VCPKG_DEFAULT_HOST_TRIPLET: x64-windows-static-release
VCPKG_FORCE_SYSTEM_BINARIES: 1
- name: Upload install folder
uses: actions/upload-artifact@v4
with:
name: tilibs_${{ matrix.os }}-${{ matrix.arch }}
path: ${{ github.workspace }}/tilibs.build/Win-${{ matrix.arch }}/prefix