-
Notifications
You must be signed in to change notification settings - Fork 0
67 lines (56 loc) · 2.09 KB
/
build.yml
File metadata and controls
67 lines (56 loc) · 2.09 KB
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
name: CMake
on:
# Trigger the workflow on push or pull request - but only for the main branch
push:
branches:
- master
tags-ignore:
- 'v*'
pull_request:
branches:
- master
env:
# Customize the CMake build type here (Release, Debug, RelWithDebInfo, etc.)
BUILD_TYPE: Release
jobs:
build-on-windows:
# See: https://docs.github.com/en/free-pro-team@latest/actions/learn-github-actions/managing-complex-workflows#using-a-build-matrix
# windows-latest or windows-2022 fail!?
runs-on: windows-2019
steps:
- name: Checkout repository
uses: actions/checkout@v3
with:
fetch-depth: 2
submodules: recursive
- name: Configure Visual Studio and CMake
working-directory: ${{runner.workspace}}
run: |
# setup the compiler
cmd.exe /c "call `"C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\VC\Auxiliary\Build\vcvars64.bat`" && set > %temp%\vcvars.txt"
Get-Content "$env:temp\vcvars.txt" | Foreach-Object { if ($_ -match "^(.*?)=(.*)$") { Set-Content "env:\$($matches[1])" $matches[2] } }
# run cmake, looks v141_xp Toolset requires VS 2019
cmake -G "Visual Studio 16 2019" -A Win32 -S ExtIO_RTL -B build_ExtIO_RTL
- name: Build
working-directory: ${{runner.workspace}}
shell: bash
run: cmake --build build_ExtIO_RTL --config $BUILD_TYPE --target ExtIO_RTL
#- name: Dir Listing
# working-directory: ${{runner.workspace}}
# shell: bash
# run: find . >src_listing.txt
- name: Collect files to distribute
working-directory: ${{runner.workspace}}
shell: bash
run: |
cp "${{runner.workspace}}/ExtIO_RTL/README.md" ./
cp "${{runner.workspace}}/ExtIO_RTL/COPYING" ./LICENSE
cp "${{runner.workspace}}/build_ExtIO_RTL/Release/ExtIO_RTL.dll" ./
- name: package and upload
uses: actions/upload-artifact@v3
with:
name: extio_rtl
path: |
${{runner.workspace}}/ExtIO_RTL.dll
${{runner.workspace}}/README.md
${{runner.workspace}}/LICENSE