-
Notifications
You must be signed in to change notification settings - Fork 625
137 lines (125 loc) · 3.97 KB
/
compilation_on_windows.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
136
137
# Copyright (C) 2019 Intel Corporation. All rights reserved.
# SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
name: compilation on windows-latest
on:
# will be triggered on PR events
pull_request:
types:
- opened
- synchronize
paths:
- ".github/workflows/compilation_on_windows.yml"
- "build-scripts/**"
- "core/**"
- "!core/deps/**"
- "product-mini/**"
- "samples/**"
- "!samples/workload/**"
- "tests/wamr-test-suites/**"
- "wamr-compiler/**"
# will be triggered on push events
push:
branches:
- main
- "dev/**"
paths:
- ".github/workflows/compilation_on_windows.yml"
- "build-scripts/**"
- "core/**"
- "!core/deps/**"
- "product-mini/**"
- "samples/**"
- "!samples/workload/**"
- "tests/wamr-test-suites/**"
- "wamr-compiler/**"
# allow to be triggered manually
workflow_dispatch:
env:
# For Spec Test
DEFAULT_TEST_OPTIONS: "-s spec -b"
MULTI_MODULES_TEST_OPTIONS: "-s spec -b -M"
THREADS_TEST_OPTIONS: "-s spec -b -p"
WASI_TEST_OPTIONS: "-s wasi_certification -w"
WASI_TEST_FILTER: ${{ github.workspace }}/product-mini/platforms/windows/wasi_filtered_tests.json
# Used when building the WASI socket and thread tests
CC: ${{ github.workspace }}/wasi-sdk/bin/clang
# Cancel any in-flight jobs for the same PR/branch so there's only one active
# at a time
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
permissions:
contents: read
jobs:
build:
runs-on: windows-latest
strategy:
matrix:
build_options: [
"-DWAMR_BUILD_AOT=1 -DWAMR_BUILD_INTERP=0",
"-DWAMR_BUILD_AOT=0",
"-DWAMR_BUILD_TAIL_CALL=1",
"-DWAMR_BUILD_CUSTOM_NAME_SECTION=1",
"-DWAMR_DISABLE_HW_BOUND_CHECK=1",
"-DWAMR_BUILD_REF_TYPES=1",
"-DWAMR_BUILD_SIMD=1",
"-DWAMR_BUILD_DEBUG_INTERP=1",
"-DWAMR_BUILD_LIB_PTHREAD=1",
"-DWAMR_BUILD_LIB_WASI_THREADS=1",
"-DWAMR_BUILD_LIBC_UVWASI=0 -DWAMR_BUILD_LIBC_WASI=1"
]
steps:
- uses: actions/checkout@v4
- name: clone uvwasi library
if: ${{ !contains(matrix.build_options, '-DWAMR_BUILD_LIBC_UVWASI=0') }}
run: |
cd core/deps
git clone https://github.com/nodejs/uvwasi.git
- name: Build iwasm
run: |
cd product-mini/platforms/windows
mkdir build && cd build
cmake .. ${{ matrix.build_options }}
cmake --build . --config Release --parallel 4
test:
runs-on: windows-latest
needs: [build]
strategy:
fail-fast: false
matrix:
running_mode:
[
"classic-interp",
"fast-interp",
]
test_option:
[
$DEFAULT_TEST_OPTIONS,
$MULTI_MODULES_TEST_OPTIONS,
$THREADS_TEST_OPTIONS,
$WASI_TEST_OPTIONS,
]
steps:
- name: checkout
uses: actions/checkout@v4
- name: download and install wasi-sdk
if: matrix.test_option == '$WASI_TEST_OPTIONS'
run: |
curl "https://github.com/WebAssembly/wasi-sdk/releases/download/wasi-sdk-20/wasi-sdk-20.0.m-mingw.tar.gz" -o wasi-sdk.tar.gz -L
mkdir wasi-sdk
tar -xzf wasi-sdk.tar.gz -C wasi-sdk --strip-components 1
- name: build socket api tests
shell: bash
if: matrix.test_option == '$WASI_TEST_OPTIONS'
run: ./build.sh
working-directory: ./core/iwasm/libraries/lib-socket/test/
- name: Build WASI thread tests
shell: bash
if: matrix.test_option == '$WASI_TEST_OPTIONS'
run: ./build.sh
working-directory: ./core/iwasm/libraries/lib-wasi-threads/test/
- name: run tests
shell: bash
timeout-minutes: 20
run: ./test_wamr.sh ${{ matrix.test_option }} -t ${{ matrix.running_mode }}
working-directory: ./tests/wamr-test-suites