From 630fef5a40d2f7a221b9c3752462c8780eb17af4 Mon Sep 17 00:00:00 2001 From: Li Jin Date: Tue, 31 Oct 2023 15:46:17 +0800 Subject: Update windows.yml --- .github/workflows/windows.yml | 23 ++++++++++++++++++++--- 1 file 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: jobs: windows: runs-on: windows-latest + if: "startsWith(github.ref, 'refs/tags/') || !contains(github.event.head_commit.message, '[skip CI]')" steps: - uses: actions/checkout@v2 - name: Setup msbuild uses: microsoft/setup-msbuild@v1.0.2 - - name: Windows build + - name: Windows build & test run: | - msbuild win-build\Yuescript.sln /p:Configuration=Release /p:Platform=x86 - msbuild win-build\Yuescript.sln /p:Configuration=Release /p:Platform=x64 + msbuild win-build\Yuescript.sln /p:Configuration=Debug /p:Platform=x86 + bin\windows\Win32\Debug\yue.exe spec\inputs -t spec\generated --tl_enabled + bin\windows\Win32\Debug\yue.exe spec\inputs\teal_lang.yue -o spec\generated\teal_lang.lua + bin\windows\Win32\Debug\yue.exe spec\inputs\loops.yue -o spec\generated\5.1\loops.lua --target=5.1 + bin\windows\Win32\Debug\yue.exe spec\inputs\try_catch.yue -o spec\generated\5.1\try_catch.lua --target=5.1 + bin\windows\Win32\Debug\yue.exe spec\inputs\attrib.yue -o spec\generated\5.1\attrib.lua --target=5.1 + bin\windows\Win32\Debug\yue.exe spec\inputs\test\loops_spec.yue -o spec\generated\5.1\test\loops_spec.lua --target=5.1 + 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)" + msbuild win-build\Yuescript.sln /p:Configuration=Debug /p:Platform=x64 + bin\windows\x64\Debug\yue.exe spec\inputs -t spec\generated --tl_enabled + bin\windows\x64\Debug\yue.exe spec\inputs\teal_lang.yue -o spec\generated\teal_lang.lua + bin\windows\x64\Debug\yue.exe spec\inputs\loops.yue -o spec\generated\5.1\loops.lua --target=5.1 + bin\windows\x64\Debug\yue.exe spec\inputs\try_catch.yue -o spec\generated\5.1\try_catch.lua --target=5.1 + bin\windows\x64\Debug\yue.exe spec\inputs\attrib.yue -o spec\generated\5.1\attrib.lua --target=5.1 + bin\windows\x64\Debug\yue.exe spec\inputs\test\loops_spec.yue -o spec\generated\5.1\test\loops_spec.lua --target=5.1 + 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)" - name: pack if: startsWith(github.ref, 'refs/tags/') run: | + msbuild win-build\Yuescript.sln /p:Configuration=Release /p:Platform=x86 + msbuild win-build\Yuescript.sln /p:Configuration=Release /p:Platform=x64 (cd bin\windows\Win32\Release && 7z a ..\..\..\..\yue-windows-x86.7z yue.exe && cd ..\..\..\..) (cd bin\windows\x64\Release && 7z a ..\..\..\..\yue-windows-x64.7z yue.exe && cd ..\..\..\..) - name: Windows build Lua 5.1 dll -- cgit v1.2.3-55-g6feb