From 08a4a7cf08b9a755406b58afe96d3ae7fe00568c Mon Sep 17 00:00:00 2001 From: Marcin Kolny Date: Thu, 30 Mar 2023 02:34:30 +0100 Subject: [PATCH] ci: Refactor windows build definition (#2087) --- .github/workflows/compilation_on_windows.yml | 89 ++++---------------- 1 file changed, 16 insertions(+), 73 deletions(-) diff --git a/.github/workflows/compilation_on_windows.yml b/.github/workflows/compilation_on_windows.yml index 073f206ed..1cf06d626 100644 --- a/.github/workflows/compilation_on_windows.yml +++ b/.github/workflows/compilation_on_windows.yml @@ -48,6 +48,20 @@ concurrency: 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" + ] steps: - uses: actions/checkout@v3 @@ -55,80 +69,9 @@ jobs: run: | cd core/deps git clone https://github.com/nodejs/uvwasi.git - - name: Build iwasm [default] + - name: Build iwasm run: | cd product-mini/platforms/windows mkdir build && cd build - cmake .. + cmake .. ${{ matrix.build_options }} cmake --build . --config Release --parallel 4 - cd .. && rm -force -r build - - name: Build iwasm [aot only] - run: | - cd product-mini/platforms/windows - mkdir build && cd build - cmake .. -DWAMR_BUILD_AOT=1 -DWAMR_BUILD_INTERP=0 - cmake --build . --config Release --parallel 4 - cd .. && rm -force -r build - - name: Build iwasm [interp only] - run: | - cd product-mini/platforms/windows - mkdir build && cd build - cmake .. -DWAMR_BUILD_AOT=0 - cmake --build . --config Release --parallel 4 - cd .. && rm -force -r build - - name: Build iwasm [tail call] - run: | - cd product-mini/platforms/windows - mkdir build && cd build - cmake .. -DWAMR_BUILD_TAIL_CALL=1 - cmake --build . --config Release --parallel 4 - cd .. && rm -force -r build - - name: Build iwasm [custom name section] - run: | - cd product-mini/platforms/windows - mkdir build && cd build - cmake .. -DWAMR_BUILD_CUSTOM_NAME_SECTION=1 - cmake --build . --config Release --parallel 4 - cd .. && rm -force -r build - - name: Build iwasm [disable hardware boundary check] - run: | - cd product-mini/platforms/windows - mkdir build && cd build - cmake .. -DWAMR_DISABLE_HW_BOUND_CHECK=1 - cmake --build . --config Release --parallel 4 - cd .. && rm -force -r build - - name: Build iwasm [reference types] - run: | - cd product-mini/platforms/windows - mkdir build && cd build - cmake .. -DWAMR_BUILD_REF_TYPES=1 - cmake --build . --config Release --parallel 4 - cd .. && rm -force -r build - - name: Build iwasm [128-bit SIMD] - run: | - cd product-mini/platforms/windows - mkdir build && cd build - cmake .. -DWAMR_BUILD_SIMD=1 - cmake --build . --config Release --parallel 4 - cd .. && rm -force -r build - - name: Build iwasm [source debugger] - run: | - cd product-mini/platforms/windows - mkdir build && cd build - cmake .. -DWAMR_BUILD_DEBUG_INTERP=1 - cmake --build . --config Release --parallel 4 - cd .. && rm -force -r build - - name: Build iwasm [lib pthread] - run: | - cd product-mini/platforms/windows - mkdir build && cd build - cmake .. -DWAMR_BUILD_LIB_PTHREAD=1 - cmake --build . --config Release --parallel 4 - cd .. && rm -force -r build - - name: Build iwasm [lib wasi-thread] - run: | - cd product-mini/platforms/windows - mkdir build && cd build - cmake .. -DWAMR_BUILD_LIB_WASI_THREADS=1 - cmake --build . --config Release --parallel 4 - cd .. && rm -force -r build