@@ -57,23 +57,33 @@ permissions:
5757 contents : read
5858
5959jobs :
60- build :
60+ build_llvm_libraries_on_windows :
61+ permissions :
62+ contents : read
63+ actions : write
64+ uses : ./.github/workflows/build_llvm_libraries.yml
65+ with :
66+ os : " windows-latest"
67+ arch : " AArch64 ARM Mips RISCV X86"
68+
69+ build_iwasm :
6170 runs-on : windows-latest
6271 strategy :
6372 matrix :
64- build_options : [
65- " -DWAMR_BUILD_AOT=1 -DWAMR_BUILD_INTERP=0" ,
66- " -DWAMR_BUILD_AOT=0" ,
67- " -DWAMR_BUILD_TAIL_CALL=1" ,
68- " -DWAMR_BUILD_CUSTOM_NAME_SECTION=1" ,
69- " -DWAMR_DISABLE_HW_BOUND_CHECK=1" ,
70- " -DWAMR_BUILD_REF_TYPES=1" ,
71- " -DWAMR_BUILD_SIMD=1" ,
72- " -DWAMR_BUILD_DEBUG_INTERP=1" ,
73- " -DWAMR_BUILD_LIB_PTHREAD=1" ,
74- " -DWAMR_BUILD_LIB_WASI_THREADS=1" ,
75- " -DWAMR_BUILD_LIBC_UVWASI=0 -DWAMR_BUILD_LIBC_WASI=1"
76- ]
73+ build_options :
74+ [
75+ " -DWAMR_BUILD_AOT=1 -DWAMR_BUILD_INTERP=0" ,
76+ " -DWAMR_BUILD_AOT=0" ,
77+ " -DWAMR_BUILD_TAIL_CALL=1" ,
78+ " -DWAMR_BUILD_CUSTOM_NAME_SECTION=1" ,
79+ " -DWAMR_DISABLE_HW_BOUND_CHECK=1" ,
80+ " -DWAMR_BUILD_REF_TYPES=1" ,
81+ " -DWAMR_BUILD_SIMD=1" ,
82+ " -DWAMR_BUILD_DEBUG_INTERP=1" ,
83+ " -DWAMR_BUILD_LIB_PTHREAD=1" ,
84+ " -DWAMR_BUILD_LIB_WASI_THREADS=1" ,
85+ " -DWAMR_BUILD_LIBC_UVWASI=0 -DWAMR_BUILD_LIBC_WASI=1" ,
86+ ]
7787 steps :
7888 - uses : actions/checkout@v4
7989
@@ -89,17 +99,49 @@ jobs:
8999 cmake .. ${{ matrix.build_options }}
90100 cmake --build . --config Release --parallel 4
91101
102+ build_wamrc :
103+ needs : [build_llvm_libraries_on_windows]
104+ runs-on : ${{ matrix.os }}
105+ strategy :
106+ matrix :
107+ include :
108+ - os : windows-latest
109+ llvm_cache_key : ${{ needs.build_llvm_libraries_on_windows.outputs.cache_key }}
110+ steps :
111+ - name : checkout
112+ uses : actions/checkout@v4
113+
114+ # since jobs.id can't contain the dot character
115+ # it is hard to use `format` to assemble the cache key
116+ - name : Get LLVM libraries
117+ id : retrieve_llvm_libs
118+ uses : actions/cache@v4
119+ with :
120+ path : |
121+ ./core/deps/llvm/build/bin
122+ ./core/deps/llvm/build/include
123+ ./core/deps/llvm/build/lib
124+ ./core/deps/llvm/build/libexec
125+ ./core/deps/llvm/build/share
126+ key : ${{ matrix.llvm_cache_key }}
127+
128+ - name : Quit if cache miss
129+ if : steps.retrieve_llvm_libs.outputs.cache-hit != 'true'
130+ run : echo "::error::can not get prebuilt llvm libraries" && exit 1
131+
132+ - name : Build wamrc
133+ run : |
134+ cmake -S . -B build
135+ cmake --build build --config Release --parallel 4
136+ working-directory : wamr-compiler
137+
92138 test :
93139 runs-on : windows-latest
94- needs : [build ]
140+ needs : [build_iwasm, build_wamrc ]
95141 strategy :
96142 fail-fast : false
97143 matrix :
98- running_mode :
99- [
100- " classic-interp" ,
101- " fast-interp" ,
102- ]
144+ running_mode : ["classic-interp", "fast-interp"]
103145 test_option :
104146 [
105147 $DEFAULT_TEST_OPTIONS,
0 commit comments