diff options
-rw-r--r-- | .github/workflows/windows.yml | 23 |
1 files changed, 20 insertions, 3 deletions
diff --git a/.github/workflows/windows.yml b/.github/workflows/windows.yml index c066971..bc53663 100644 --- a/.github/workflows/windows.yml +++ b/.github/workflows/windows.yml | |||
@@ -11,17 +11,34 @@ on: | |||
11 | jobs: | 11 | jobs: |
12 | windows: | 12 | windows: |
13 | runs-on: windows-latest | 13 | runs-on: windows-latest |
14 | if: "startsWith(github.ref, 'refs/tags/') || !contains(github.event.head_commit.message, '[skip CI]')" | ||
14 | steps: | 15 | steps: |
15 | - uses: actions/checkout@v2 | 16 | - uses: actions/checkout@v2 |
16 | - name: Setup msbuild | 17 | - name: Setup msbuild |
17 | uses: microsoft/setup-msbuild@v1.0.2 | 18 | uses: microsoft/setup-msbuild@v1.0.2 |
18 | - name: Windows build | 19 | - name: Windows build & test |
19 | run: | | 20 | run: | |
20 | msbuild win-build\Yuescript.sln /p:Configuration=Release /p:Platform=x86 | 21 | msbuild win-build\Yuescript.sln /p:Configuration=Debug /p:Platform=x86 |
21 | msbuild win-build\Yuescript.sln /p:Configuration=Release /p:Platform=x64 | 22 | bin\windows\Win32\Debug\yue.exe spec\inputs -t spec\generated --tl_enabled |
23 | bin\windows\Win32\Debug\yue.exe spec\inputs\teal_lang.yue -o spec\generated\teal_lang.lua | ||
24 | bin\windows\Win32\Debug\yue.exe spec\inputs\loops.yue -o spec\generated\5.1\loops.lua --target=5.1 | ||
25 | bin\windows\Win32\Debug\yue.exe spec\inputs\try_catch.yue -o spec\generated\5.1\try_catch.lua --target=5.1 | ||
26 | bin\windows\Win32\Debug\yue.exe spec\inputs\attrib.yue -o spec\generated\5.1\attrib.lua --target=5.1 | ||
27 | bin\windows\Win32\Debug\yue.exe spec\inputs\test\loops_spec.yue -o spec\generated\5.1\test\loops_spec.lua --target=5.1 | ||
28 | bin\windows\Win32\Debug\yue.exe -e "io.popen('git diff --no-index spec\\outputs spec\\generated')\read('*a') |> ((r)-> r ~= '' and print(r) and os.exit 1)" | ||
29 | msbuild win-build\Yuescript.sln /p:Configuration=Debug /p:Platform=x64 | ||
30 | bin\windows\x64\Debug\yue.exe spec\inputs -t spec\generated --tl_enabled | ||
31 | bin\windows\x64\Debug\yue.exe spec\inputs\teal_lang.yue -o spec\generated\teal_lang.lua | ||
32 | bin\windows\x64\Debug\yue.exe spec\inputs\loops.yue -o spec\generated\5.1\loops.lua --target=5.1 | ||
33 | bin\windows\x64\Debug\yue.exe spec\inputs\try_catch.yue -o spec\generated\5.1\try_catch.lua --target=5.1 | ||
34 | bin\windows\x64\Debug\yue.exe spec\inputs\attrib.yue -o spec\generated\5.1\attrib.lua --target=5.1 | ||
35 | bin\windows\x64\Debug\yue.exe spec\inputs\test\loops_spec.yue -o spec\generated\5.1\test\loops_spec.lua --target=5.1 | ||
36 | bin\windows\x64\Debug\yue.exe -e "io.popen('git diff --no-index spec\\outputs spec\\generated')\read('*a') |> ((r)-> r ~= '' and print(r) and os.exit 1)" | ||
22 | - name: pack | 37 | - name: pack |
23 | if: startsWith(github.ref, 'refs/tags/') | 38 | if: startsWith(github.ref, 'refs/tags/') |
24 | run: | | 39 | run: | |
40 | msbuild win-build\Yuescript.sln /p:Configuration=Release /p:Platform=x86 | ||
41 | msbuild win-build\Yuescript.sln /p:Configuration=Release /p:Platform=x64 | ||
25 | (cd bin\windows\Win32\Release && 7z a ..\..\..\..\yue-windows-x86.7z yue.exe && cd ..\..\..\..) | 42 | (cd bin\windows\Win32\Release && 7z a ..\..\..\..\yue-windows-x86.7z yue.exe && cd ..\..\..\..) |
26 | (cd bin\windows\x64\Release && 7z a ..\..\..\..\yue-windows-x64.7z yue.exe && cd ..\..\..\..) | 43 | (cd bin\windows\x64\Release && 7z a ..\..\..\..\yue-windows-x64.7z yue.exe && cd ..\..\..\..) |
27 | - name: Windows build Lua 5.1 dll | 44 | - name: Windows build Lua 5.1 dll |