Skip to content

Commit 08a4a7c

Browse files
authored
ci: Refactor windows build definition (#2087)
1 parent 5aa22d4 commit 08a4a7c

File tree

1 file changed

+16
-73
lines changed

1 file changed

+16
-73
lines changed

.github/workflows/compilation_on_windows.yml

Lines changed: 16 additions & 73 deletions
Original file line numberDiff line numberDiff line change
@@ -48,87 +48,30 @@ concurrency:
4848
jobs:
4949
build:
5050
runs-on: windows-latest
51+
strategy:
52+
matrix:
53+
build_options: [
54+
"-DWAMR_BUILD_AOT=1 -DWAMR_BUILD_INTERP=0",
55+
"-DWAMR_BUILD_AOT=0",
56+
"-DWAMR_BUILD_TAIL_CALL=1",
57+
"-DWAMR_BUILD_CUSTOM_NAME_SECTION=1",
58+
"-DWAMR_DISABLE_HW_BOUND_CHECK=1",
59+
"-DWAMR_BUILD_REF_TYPES=1",
60+
"-DWAMR_BUILD_SIMD=1",
61+
"-DWAMR_BUILD_DEBUG_INTERP=1",
62+
"-DWAMR_BUILD_LIB_PTHREAD=1",
63+
"-DWAMR_BUILD_LIB_WASI_THREADS=1"
64+
]
5165
steps:
5266
- uses: actions/checkout@v3
5367

5468
- name: clone uvwasi library
5569
run: |
5670
cd core/deps
5771
git clone https://github.com/nodejs/uvwasi.git
58-
- name: Build iwasm [default]
72+
- name: Build iwasm
5973
run: |
6074
cd product-mini/platforms/windows
6175
mkdir build && cd build
62-
cmake ..
76+
cmake .. ${{ matrix.build_options }}
6377
cmake --build . --config Release --parallel 4
64-
cd .. && rm -force -r build
65-
- name: Build iwasm [aot only]
66-
run: |
67-
cd product-mini/platforms/windows
68-
mkdir build && cd build
69-
cmake .. -DWAMR_BUILD_AOT=1 -DWAMR_BUILD_INTERP=0
70-
cmake --build . --config Release --parallel 4
71-
cd .. && rm -force -r build
72-
- name: Build iwasm [interp only]
73-
run: |
74-
cd product-mini/platforms/windows
75-
mkdir build && cd build
76-
cmake .. -DWAMR_BUILD_AOT=0
77-
cmake --build . --config Release --parallel 4
78-
cd .. && rm -force -r build
79-
- name: Build iwasm [tail call]
80-
run: |
81-
cd product-mini/platforms/windows
82-
mkdir build && cd build
83-
cmake .. -DWAMR_BUILD_TAIL_CALL=1
84-
cmake --build . --config Release --parallel 4
85-
cd .. && rm -force -r build
86-
- name: Build iwasm [custom name section]
87-
run: |
88-
cd product-mini/platforms/windows
89-
mkdir build && cd build
90-
cmake .. -DWAMR_BUILD_CUSTOM_NAME_SECTION=1
91-
cmake --build . --config Release --parallel 4
92-
cd .. && rm -force -r build
93-
- name: Build iwasm [disable hardware boundary check]
94-
run: |
95-
cd product-mini/platforms/windows
96-
mkdir build && cd build
97-
cmake .. -DWAMR_DISABLE_HW_BOUND_CHECK=1
98-
cmake --build . --config Release --parallel 4
99-
cd .. && rm -force -r build
100-
- name: Build iwasm [reference types]
101-
run: |
102-
cd product-mini/platforms/windows
103-
mkdir build && cd build
104-
cmake .. -DWAMR_BUILD_REF_TYPES=1
105-
cmake --build . --config Release --parallel 4
106-
cd .. && rm -force -r build
107-
- name: Build iwasm [128-bit SIMD]
108-
run: |
109-
cd product-mini/platforms/windows
110-
mkdir build && cd build
111-
cmake .. -DWAMR_BUILD_SIMD=1
112-
cmake --build . --config Release --parallel 4
113-
cd .. && rm -force -r build
114-
- name: Build iwasm [source debugger]
115-
run: |
116-
cd product-mini/platforms/windows
117-
mkdir build && cd build
118-
cmake .. -DWAMR_BUILD_DEBUG_INTERP=1
119-
cmake --build . --config Release --parallel 4
120-
cd .. && rm -force -r build
121-
- name: Build iwasm [lib pthread]
122-
run: |
123-
cd product-mini/platforms/windows
124-
mkdir build && cd build
125-
cmake .. -DWAMR_BUILD_LIB_PTHREAD=1
126-
cmake --build . --config Release --parallel 4
127-
cd .. && rm -force -r build
128-
- name: Build iwasm [lib wasi-thread]
129-
run: |
130-
cd product-mini/platforms/windows
131-
mkdir build && cd build
132-
cmake .. -DWAMR_BUILD_LIB_WASI_THREADS=1
133-
cmake --build . --config Release --parallel 4
134-
cd .. && rm -force -r build

0 commit comments

Comments
 (0)