@@ -2,16 +2,28 @@ name: CI
22
33on : [push, pull_request]
44
5+ # Cancel any previous workflows if the pull request was updated
6+ concurrency :
7+ group : ${{ github.workflow }}-${{ github.ref || github.run_id }}
8+ cancel-in-progress : true
9+
510jobs :
611 build :
712 if : github.event_name == 'push' || github.event.pull_request.head.repo.full_name != github.repository
813 strategy :
914 fail-fast : false
1015 matrix :
16+ # build-cfg: [Debug, DebugOpt, Release] # clang isn't build for debug on linux/macos
17+ build-cfg : [DebugOpt, Release]
18+
1119 config :
1220 - { os: ubuntu-22.04, platform: x64, cxx: g++-11, cc: gcc-11 }
1321 - { os: macos-12, platform: x64, cxx: clang++, cc: clang }
1422 - { os: windows-2022, platform: x64, vs: "Program Files/Microsoft Visual Studio/2022" }
23+
24+ include :
25+ - config.os : windows-2022
26+ build-cfg : Debug
1527
1628 runs-on : ${{ matrix.config.os }}
1729
2032 CXX : ${{ matrix.config.cxx }}
2133 VS_VERSION : ${{ matrix.config.vs }}
2234 PLATFORM : ${{ matrix.config.platform }}
35+ BUILD_CONFIGURATION : ${{ matrix.build-cfg }}
2336 DOTNET_NOLOGO : true
2437 DOTNET_CLI_TELEMETRY_OPTOUT : true
2538 EMSCRIPTEN_VERSION : 3.1.65
@@ -56,20 +69,20 @@ jobs:
5669 - name : Setup
5770 shell : bash
5871 run : |
59- build/build.sh generate -platform $PLATFORM
60- build/build.sh download_llvm -platform $PLATFORM
72+ build/build.sh generate -platform $PLATFORM -configuration $BUILD_CONFIGURATION
73+ build/build.sh download_llvm -platform $PLATFORM -configuration $BUILD_CONFIGURATION
6174
6275 - name : Restore
6376 shell : bash
64- run : build/build.sh restore -platform $PLATFORM
77+ run : build/build.sh restore -platform $PLATFORM -configuration $BUILD_CONFIGURATION
6578
6679 - name : Build
6780 shell : bash
68- run : build/build.sh -platform $PLATFORM -build_only
81+ run : build/build.sh -platform $PLATFORM -build_only -configuration $BUILD_CONFIGURATION
6982
7083 - name : Test (.NET)
7184 shell : bash
72- run : build/test.sh -platform $PLATFORM
85+ run : build/test.sh -platform $PLATFORM -configuration $BUILD_CONFIGURATION
7386
7487 - name : Build (QuickJS runtime)
7588 shell : bash
88101
89102 - name : Pack
90103 shell : bash
91- run : build/build.sh prepack -platform $PLATFORM
104+ run : build/build.sh prepack -platform $PLATFORM -configuration $BUILD_CONFIGURATION
92105
93106 - uses : actions/upload-artifact@v3
94107 with :
@@ -107,6 +120,7 @@ jobs:
107120 env :
108121 DOTNET_NOLOGO : true
109122 DOTNET_CLI_TELEMETRY_OPTOUT : true
123+ BUILD_CONFIGURATION : Release
110124
111125 steps :
112126 - uses : actions/checkout@v4
@@ -122,11 +136,11 @@ jobs:
122136
123137 - name : Setup
124138 shell : bash
125- run : build/build.sh generate_config
139+ run : build/build.sh generate_config -configuration $BUILD_CONFIGURATION
126140
127141 - name : Create package
128142 shell : bash
129- run : build/build.sh pack
143+ run : build/build.sh pack -configuration $BUILD_CONFIGURATION
130144
131145 - name : Upload package
132146 uses : actions/upload-artifact@v3
0 commit comments