-
Notifications
You must be signed in to change notification settings - Fork 176
135 lines (115 loc) · 4.02 KB
/
windows-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
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
name: Windows Test
on:
workflow_dispatch:
pull_request:
push:
tags:
- 'v*.*.*'
branches:
- master
- develop
concurrency:
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
cancel-in-progress: true
jobs:
windows-test:
name: Windows MSVC Test
runs-on: windows-2019 # TODO: Implement matrix with windows 2019 and 2022
strategy:
fail-fast: false
matrix:
options: [
{build: debug, sanitizer: without-sanitizer},
{build: debug, sanitizer: address-sanitizer},
# TODO: Not supported yet by MSVC
# {build: debug, sanitizer: thread-sanitizer},
# {build: debug, sanitizer: memory-sanitizer},
# TODO: https://github.com/metacall/core/issues/461
# {build: release, sanitizer: without-sanitizer}
]
steps:
- name: Check out the repository
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Activate the Visual Studio Developer Prompt
uses: ilammy/msvc-dev-cmd@v1
with:
arch: amd64
- name: Set up the environment
run: cmd.exe /c "powershell .\tools\metacall-environment.ps1 $Env:METACALL_INSTALL_OPTIONS"
env:
METACALL_INSTALL_OPTIONS: python nodejs java ruby typescript wasm rpc file # netcore5 java c cobol rust rapidjson funchook swig pack # clangformat v8rep51 coverage
- name: Configure
run: |
$METACALL_PATH = $PWD
md -Force "$METACALL_PATH\build"
cd "$METACALL_PATH\build"
cmd.exe /c "powershell ..\tools\metacall-configure.ps1 $Env:METACALL_BUILD_OPTIONS"
env:
METACALL_BUILD_OPTIONS: ${{ matrix.options.build }} ${{ matrix.options.sanitizer }} scripts ports tests python nodejs java ruby typescript wasm rpc file # netcore5 java c cobol rust examples install pack benchmarks # v8 coverage
- name: Build
working-directory: ./build
run: cmd.exe /c "powershell ..\tools\metacall-build.ps1 $Env:METACALL_BUILD_OPTIONS"
env:
METACALL_BUILD_OPTIONS: ${{ matrix.options.build }} tests
windows-mingw-test:
name: Windows MinGW Test
runs-on: windows-latest
strategy:
fail-fast: false
matrix:
build_type: [Debug, Release]
sys: [mingw32, mingw64, ucrt64, clang64]
defaults:
run:
shell: msys2 {0}
steps:
- name: Check out the repository
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: '${{ matrix.sys }} Setup MSYS2'
uses: msys2/setup-msys2@v2
with:
msystem: ${{ matrix.sys }}
update: true
install: >-
base-devel
git
cmake
make
pacboy: >-
toolchain:p
cmake:p
ninja:p
- name: Create build directory
run: mkdir build
- name: Configure with CMake
working-directory: ./build
run: |
cmake -G "MinGW Makefiles" -DCMAKE_BUILD_TYPE=${{ matrix.build_type }} -DOPTION_FORK_SAFE=OFF -DOPTION_BUILD_PLUGINS_BACKTRACE=OFF ..
- name: Build with CMake
working-directory: ./build
run: |
cmake --build .
- name: Run CTest
working-directory: ./build
run: |
ctest -j$(getconf _NPROCESSORS_ONLN) --timeout 5400 --output-on-failure -C ${{ matrix.build_type }}
windows-distributable:
name: Windows Distributable Dispatch
needs: windows-test
runs-on: ubuntu-latest
if: startsWith(github.ref, 'refs/tags/') || github.ref == 'refs/heads/master'
steps:
- name: Windows Workflow Dispatch
uses: convictional/[email protected]
with:
owner: metacall
repo: distributable-windows
github_token: ${{ secrets.G_PERSONAL_ACCESS_TOKEN }}
workflow_file_name: ci.yml
wait_workflow: true
client_payload: '{"ref": "${{ github.head_ref || github.ref_name }}"}'
ref: master