From 5105c962091c05f47c431db1bc491dc0b4853792 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Lukas=20Backstr=C3=B6m?= Date: Fri, 25 Oct 2024 13:33:07 +0200 Subject: [PATCH 01/25] Only need gcc+g++ when building interpreter --- .github/workflows/main.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/main.yaml b/.github/workflows/main.yaml index 36ce23901695..9815cacde377 100644 --- a/.github/workflows/main.yaml +++ b/.github/workflows/main.yaml @@ -293,7 +293,7 @@ jobs: distribution: Ubuntu-18.04 - name: Install WSL dependencies - run: apt update && apt install -y g++-mingw-w64 gcc-mingw-w64 make autoconf unzip + run: apt update && apt install -y make autoconf unzip - name: Install openssl shell: cmd From f9633cb64a17b31b3cb038279b0acc550bfa7425 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Lukas=20Backstr=C3=B6m?= Date: Fri, 1 Nov 2024 16:01:39 +0100 Subject: [PATCH 02/25] erts: Fix possible Visual Studio bug Visual Studio 17 seems to compile the original code into something that make coverage into MAX_SMALL instead of coverage_data. Extracting the data into a variable seems to fix the error, don't know why but hopefully it will be fixed in the compiler someday. Or maybe the original code is somesort of undefined behaviour I'm unable to see. The original code compiles as it should in Visual Studio 14. --- erts/emulator/beam/erl_bif_coverage.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/erts/emulator/beam/erl_bif_coverage.c b/erts/emulator/beam/erl_bif_coverage.c index 0ff51b8de0ac..6c508b711587 100644 --- a/erts/emulator/beam/erl_bif_coverage.c +++ b/erts/emulator/beam/erl_bif_coverage.c @@ -374,6 +374,7 @@ get_cover_id_line(Process* c_p, const BeamCodeHeader* hdr) for (i = hdr->line_coverage_len - 1; i >= 0; i--) { Eterm coverage = am_error; Uint* coverage_array = hdr->coverage; + Sint coverage_data; unsigned cover_id; if (!hdr->line_coverage_valid[i]) { @@ -388,7 +389,8 @@ get_cover_id_line(Process* c_p, const BeamCodeHeader* hdr) if (location == LINE_INVALID_LOCATION) { continue; } - coverage = make_small(MIN(coverage_array[i], MAX_SMALL)); + coverage_data = coverage_array[i]; + coverage = make_small(MIN(coverage_data, MAX_SMALL)); cover_id = loc2id[i]; tmp = TUPLE2(hp, make_small(cover_id), coverage); hp += 3; From 0e52092e783a5168f4f018892a8be83f1dd06738 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Lukas=20Backstr=C3=B6m?= Date: Mon, 4 Nov 2024 16:12:29 +0100 Subject: [PATCH 03/25] erts: Include jit.pdb and release all pdb files When debugging on windows, the name of the pdb file is not the name of the file being debugger, but the name of the file as it was compiled. We rename beam.jit.dll to beam.smp.dll during the build so the pdb needed is called jit.pdb and not smp.pdb. We also make sure to release all pdb files so that they are part of the installer. --- erts/emulator/Makefile.in | 4 ++++ erts/epmd/src/Makefile.in | 3 +++ erts/etc/common/Makefile.in | 5 +++++ lib/sasl/src/systools_make.erl | 3 ++- lib/sasl/test/systools_SUITE.erl | 24 ++++++++++++++++++------ otp_build | 15 ++++----------- 6 files changed, 36 insertions(+), 18 deletions(-) diff --git a/erts/emulator/Makefile.in b/erts/emulator/Makefile.in index a35bc38d4099..f926ab69291f 100644 --- a/erts/emulator/Makefile.in +++ b/erts/emulator/Makefile.in @@ -559,6 +559,10 @@ release_spec: all $(INSTALL_DATA) $(RELEASE_INCLUDES) "$(RELEASE_PATH)/usr/include" $(INSTALL_DATA) $(RELEASE_INCLUDES) "$(RELSYSDIR)/include" $(INSTALL_PROGRAM) $(BINDIR)/$(EMULATOR_EXECUTABLE) "$(RELSYSDIR)/bin" +ifeq ($(TARGET),win32) + $(INSTALL_DATA) $(BINDIR)/$(EMULATOR_EXECUTABLE:.dll=.pdb) "$(RELSYSDIR)/bin" + $(INSTALL_DATA) $(BINDIR)/$(FLAVOR_EXECUTABLE:.dll=.pdb) "$(RELSYSDIR)/bin" +endif ifeq ($(RELEASE_LIBBEAM),yes) $(INSTALL_DIR) "$(RELSYSDIR)/lib" $(INSTALL_PROGRAM) $(BINDIR)/$(EMULATOR_LIB) "$(RELSYSDIR)/lib" diff --git a/erts/epmd/src/Makefile.in b/erts/epmd/src/Makefile.in index f21ac5e38652..640ac84fbe76 100644 --- a/erts/epmd/src/Makefile.in +++ b/erts/epmd/src/Makefile.in @@ -120,6 +120,9 @@ include $(ERL_TOP)/make/otp_release_targets.mk release_spec: all $(INSTALL_DIR) "$(RELEASE_PATH)/erts-$(VSN)/bin" $(INSTALL_PROGRAM) $(INSTALL_PROGS) "$(RELEASE_PATH)/erts-$(VSN)/bin" +ifeq ($(TARGET),win32) + $(INSTALL_DATA) $(INSTALL_PROGS:.exe=.pdb) "$(RELEASE_PATH)/erts-$(VSN)/bin" +endif release_docs_spec: diff --git a/erts/etc/common/Makefile.in b/erts/etc/common/Makefile.in index 2778fb1504d9..6f8750d25ff9 100644 --- a/erts/etc/common/Makefile.in +++ b/erts/etc/common/Makefile.in @@ -467,6 +467,7 @@ $(OBJDIR)/safe_string.o: $(ETC)/safe_string.c $(RC_GENERATED) # erl_call $(BINDIR)/erl_call@EXEEXT@: $(ERL_TOP)/lib/erl_interface/bin/$(TARGET)/erl_call@EXEEXT@ $(ld_verbose)cp $< $@ + $(ld_verbose)cp $(<:.exe=.pdb) $(@:.exe=.pdb) ifneq ($(TARGET),win32) $(BINDIR)/$(ERLEXEC): $(OBJDIR)/$(ERLEXEC).o $(ERTS_LIB) @@ -545,6 +546,10 @@ ifneq ($(TARGET), win32) endif ifneq ($(INSTALL_PROGS),) $(INSTALL_PROGRAM) $(INSTALL_PROGS) "$(RELEASE_PATH)/erts-$(VSN)/bin" +ifeq ($(TARGET),win32) + $(INSTALL_DATA) $(INSTALL_PROGS:.exe=.pdb) "$(RELEASE_PATH)/erts-$(VSN)/bin" + $(INSTALL_DATA) $(INSTALL_PROGS:.dll=.pdb) "$(RELEASE_PATH)/erts-$(VSN)/bin" +endif endif ifneq ($(INSTALL_TOP),) $(INSTALL_SCRIPT) $(INSTALL_TOP) "$(RELEASE_PATH)" diff --git a/lib/sasl/src/systools_make.erl b/lib/sasl/src/systools_make.erl index bc3b0ae92cf4..55743777feae 100644 --- a/lib/sasl/src/systools_make.erl +++ b/lib/sasl/src/systools_make.erl @@ -1589,9 +1589,10 @@ preloaded() -> erts_binary_filter() -> Cmds = ["typer", "dialyzer", "ct_run", "yielding_c_fun", "erlc"], + Extensions = [".exe", ".pdb"], case os:type() of {unix,_} -> Cmds; - {win32,_} -> [ [Cmd, ".exe"] || Cmd <- Cmds] + {win32,_} -> [ [Cmd, Ext] || Cmd <- Cmds, Ext <- Extensions] end. %%______________________________________________________________________ diff --git a/lib/sasl/test/systools_SUITE.erl b/lib/sasl/test/systools_SUITE.erl index a72b65f0f777..b769e801d19e 100644 --- a/lib/sasl/test/systools_SUITE.erl +++ b/lib/sasl/test/systools_SUITE.erl @@ -1119,12 +1119,24 @@ erts_tar(Config) -> "start","start_erl.src","start.src","to_erl"], ["ct_run","dialyzer","erlc","typer","yielding_c_fun"]}; {win32, _} -> - {["beam.smp.pdb","erl.exe", - "erl.pdb","erl_log.exe","erlexec.dll","erlsrv.exe","heart.exe", - "start_erl.exe","beam.smp.dll", - "epmd.exe","erl.ini","erl_call.exe", - "erlexec.pdb","escript.exe","inet_gethost.exe"], - ["dialyzer.exe","erlc.exe","yielding_c_fun.exe","ct_run.exe","typer.exe"]} + Files = ["beam.smp.dll", + "epmd.exe", + "erl.exe", + "erl_log.exe", + "erlexec.dll", + "erlsrc.exe", + "escript.exe", + "heart.exe", + "inet_gethost.exe", + "start_erl.exe"], + PdbFiles = [filename:rootname(F) ++ ".pdb" || F <- Files], + IgnoredFiles = ["ct_run.exe", + "dialyzer.exe", + "erlc.exe", + "typer.exe", + "yielding_c_fun.exe"], + PdbIgnored = [filename:rootname(F) ++ ".pdb" || F <- IgnoredFiles], + {Files ++ PdbFiles, IgnoredFiles ++ PdbIgnored} end, ErtsTarContent = diff --git a/otp_build b/otp_build index 793f09444c15..c9ca707650df 100755 --- a/otp_build +++ b/otp_build @@ -1257,20 +1257,13 @@ do_update_ex_doc () do_debuginfo_win32 () { setup_make - (cd erts/emulator && $MAKE MAKE="$MAKE" TARGET=$TARGET debug) || exit 1 + ($MAKE MAKE="$MAKE" TARGET=$TARGET TYPE=debug) || exit 1 if [ -z "$1" ]; then - RELDIR="$ERL_TOP/release/$TARGET" + RELDIR="$ERL_TOP/release/$TARGET" else - RELDIR="$1" + RELDIR="$1" fi - BINDIR="$ERL_TOP/bin/$TARGET" - EVSN=`grep '^VSN' erts/vsn.mk | sed 's,^VSN.*=[^0-9]*\([0-9].*\)$,@\1,g;s,^[^@].*,,g;s,^@,,g'` - for f in beam.debug.smp.dll beam.smp.pdb beam.debug.smp.dll.pdb erl.pdb erlexec.pdb; do - if [ -f $BINDIR/$f ]; then - rm -f $RELDIR/erts-$EVSN/bin/$f - cp $BINDIR/$f $RELDIR/erts-$EVSN/bin/$f - fi - done + ($MAKE release RELEASE_ROOT="$RELDIR" MAKE="$MAKE" TARGET=$TARGET TYPE=debug) || exit 1 } do_installer_win32 () From e486ba2906e089c1696b681935ca4a3ac85fbacf Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Lukas=20Backstr=C3=B6m?= Date: Thu, 23 Jan 2025 12:44:24 +0100 Subject: [PATCH 04/25] Filter out debug pdb files --- lib/sasl/test/systools_SUITE.erl | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/sasl/test/systools_SUITE.erl b/lib/sasl/test/systools_SUITE.erl index b769e801d19e..d1b1915496bd 100644 --- a/lib/sasl/test/systools_SUITE.erl +++ b/lib/sasl/test/systools_SUITE.erl @@ -1146,9 +1146,9 @@ erts_tar(Config) -> || File <- tar_contents(TarName), string:equal(filename:dirname(File),ERTS_DIR), %% Filter out beam.*.smp.* - re:run(filename:basename(File), "beam\\.[^\\.]+\\.smp(\\.dll)?") == nomatch, + re:run(filename:basename(File), "beam\\.[^\\.]+\\.smp(\\.dll|\\.pdb)?") == nomatch, %% Filter out beam.*.emu.* - re:run(filename:basename(File), "beam\\.([^\\.]+\\.)?emu(\\.dll)?") == nomatch, + re:run(filename:basename(File), "beam\\.([^\\.]+\\.)?emu(\\.dll\\.pdb)?") == nomatch, %% Filter out any erl_child_setup.* re:run(filename:basename(File), "erl_child_setup\\..*") == nomatch ]) From f56190507c341184f876470daf4de7b1b3cfc6ad Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Lukas=20Backstr=C3=B6m?= Date: Thu, 23 Jan 2025 12:46:32 +0100 Subject: [PATCH 05/25] Fix more filters --- lib/sasl/test/systools_SUITE.erl | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/lib/sasl/test/systools_SUITE.erl b/lib/sasl/test/systools_SUITE.erl index d1b1915496bd..9c5ad946e45c 100644 --- a/lib/sasl/test/systools_SUITE.erl +++ b/lib/sasl/test/systools_SUITE.erl @@ -1122,9 +1122,10 @@ erts_tar(Config) -> Files = ["beam.smp.dll", "epmd.exe", "erl.exe", + "erl_call.exe", "erl_log.exe", "erlexec.dll", - "erlsrc.exe", + "erlsrv.exe", "escript.exe", "heart.exe", "inet_gethost.exe", @@ -1136,7 +1137,7 @@ erts_tar(Config) -> "typer.exe", "yielding_c_fun.exe"], PdbIgnored = [filename:rootname(F) ++ ".pdb" || F <- IgnoredFiles], - {Files ++ PdbFiles, IgnoredFiles ++ PdbIgnored} + {["erl.ini"] ++ Files ++ PdbFiles, IgnoredFiles ++ PdbIgnored} end, ErtsTarContent = From 8b925efe2a80e98df9f458ff14c6f1c802ee21e2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Lukas=20Backstr=C3=B6m?= Date: Tue, 28 Jan 2025 10:07:50 +0100 Subject: [PATCH 06/25] Fix more exec filters --- lib/sasl/test/systools_SUITE.erl | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/lib/sasl/test/systools_SUITE.erl b/lib/sasl/test/systools_SUITE.erl index 9c5ad946e45c..96dfd06db7b1 100644 --- a/lib/sasl/test/systools_SUITE.erl +++ b/lib/sasl/test/systools_SUITE.erl @@ -1130,7 +1130,7 @@ erts_tar(Config) -> "heart.exe", "inet_gethost.exe", "start_erl.exe"], - PdbFiles = [filename:rootname(F) ++ ".pdb" || F <- Files], + PdbFiles = ["beam.jit.pdb"] ++ [filename:rootname(F) ++ ".pdb" || F <- Files], IgnoredFiles = ["ct_run.exe", "dialyzer.exe", "erlc.exe", @@ -1150,6 +1150,8 @@ erts_tar(Config) -> re:run(filename:basename(File), "beam\\.[^\\.]+\\.smp(\\.dll|\\.pdb)?") == nomatch, %% Filter out beam.*.emu.* re:run(filename:basename(File), "beam\\.([^\\.]+\\.)?emu(\\.dll\\.pdb)?") == nomatch, + %% Filter out beam.*.jit.pdb + re:run(filename:basename(File), "beam\\.([^\\.]+\\.)?jit\\.pdb") == nomatch, %% Filter out any erl_child_setup.* re:run(filename:basename(File), "erl_child_setup\\..*") == nomatch ]) From b9420934d180155e6808915cfc67819c8372c390 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Lukas=20Backstr=C3=B6m?= Date: Tue, 28 Jan 2025 10:08:06 +0100 Subject: [PATCH 07/25] erts: Fix cc.sh to respect -O0 --- erts/etc/win32/wsl_tools/vc/cc.sh | 2 ++ 1 file changed, 2 insertions(+) diff --git a/erts/etc/win32/wsl_tools/vc/cc.sh b/erts/etc/win32/wsl_tools/vc/cc.sh index 493c6b640365..2d3d524f803d 100755 --- a/erts/etc/win32/wsl_tools/vc/cc.sh +++ b/erts/etc/win32/wsl_tools/vc/cc.sh @@ -123,6 +123,8 @@ while test -n "$1" ; do MD=-MD; fi OPTIMIZED_BUILD=true;; + -O0) + ;; -O*) # Optimization hardcoded OPTIMIZE_FLAGS="-Ox -Z7"; From 3d8824329aa265eb45b4b0fa6879b5d7a0f5c49d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Lukas=20Backstr=C3=B6m?= Date: Wed, 29 Jan 2025 14:34:31 +0100 Subject: [PATCH 08/25] More filter fixes --- lib/sasl/test/systools_SUITE.erl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/sasl/test/systools_SUITE.erl b/lib/sasl/test/systools_SUITE.erl index 96dfd06db7b1..e246dafd5530 100644 --- a/lib/sasl/test/systools_SUITE.erl +++ b/lib/sasl/test/systools_SUITE.erl @@ -1151,7 +1151,7 @@ erts_tar(Config) -> %% Filter out beam.*.emu.* re:run(filename:basename(File), "beam\\.([^\\.]+\\.)?emu(\\.dll\\.pdb)?") == nomatch, %% Filter out beam.*.jit.pdb - re:run(filename:basename(File), "beam\\.([^\\.]+\\.)?jit\\.pdb") == nomatch, + re:run(filename:basename(File), "beam\\.[^\\.]+\\.?jit\\.pdb") == nomatch, %% Filter out any erl_child_setup.* re:run(filename:basename(File), "erl_child_setup\\..*") == nomatch ]) From 08898128a0bf1ba66aa5cd9fddd78f5022e65989 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Lukas=20Backstr=C3=B6m?= Date: Thu, 30 Jan 2025 10:41:49 +0100 Subject: [PATCH 09/25] Release pdb for ycf --- erts/lib_src/Makefile.in | 3 +++ 1 file changed, 3 insertions(+) diff --git a/erts/lib_src/Makefile.in b/erts/lib_src/Makefile.in index 392d10f49341..cdc51b4db5f2 100644 --- a/erts/lib_src/Makefile.in +++ b/erts/lib_src/Makefile.in @@ -455,6 +455,9 @@ INTERNAL_RELEASE_LIBS= \ .PHONY: release_spec release_spec: all $(INSTALL_PROGRAM) $(YCF_EXECUTABLE) "$(RELSYSDIR)/bin" +ifeq ($(TARGET),win32) + $(INSTALL_DATA) $(YCF_EXECUTABLE:.exe=.pdb) "$(RELEASE_PATH)/erts-$(VSN)/bin" +endif ifneq ($(strip $(RELEASE_INCLUDES)),) $(INSTALL_DIR) "$(RELSYSDIR)/include" $(INSTALL_DIR) "$(RELEASE_PATH)/usr/include" From 4884d9f0c49ced5273a436279a2e319eee3a70d1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Lukas=20Backstr=C3=B6m?= Date: Wed, 18 Sep 2024 10:34:06 +0200 Subject: [PATCH 10/25] Fix windows make test and add windows testing to github actions --- .github/workflows/main.yaml | 193 ++++++++++++++++++++++++++++++++++-- make/test_target_script.sh | 19 ++-- 2 files changed, 197 insertions(+), 15 deletions(-) diff --git a/.github/workflows/main.yaml b/.github/workflows/main.yaml index 9815cacde377..d261dbd808ae 100644 --- a/.github/workflows/main.yaml +++ b/.github/workflows/main.yaml @@ -278,22 +278,25 @@ jobs: path: otp/liberlang.xcframework build-windows: + name: Build Erlang/OTP (Windows) + needs: pack + if: needs.pack.outputs.c-code-changes + runs-on: windows-2022 defaults: run: shell: wsl-bash {0} env: WXWIDGETS_VERSION: 3.2.6 - name: Build Erlang/OTP (Windows) - runs-on: windows-2022 - needs: pack - if: needs.pack.outputs.c-code-changes + outputs: + installer_name: ${{ steps.compile-erlang.outputs.installer_name }} + steps: - uses: Vampire/setup-wsl@5ff2c045a05fd477a71b5419d50c5a228a52468e # ratchet:Vampire/setup-wsl@v4.1.0 with: distribution: Ubuntu-18.04 - name: Install WSL dependencies - run: apt update && apt install -y make autoconf unzip + run: apt update && apt install -y make autoconf unzip zip - name: Install openssl shell: cmd @@ -349,6 +352,9 @@ jobs: name: otp_prebuilt - name: Compile Erlang + id: compile-erlang + env: + WSLENV: GITHUB_OUTPUT/p run: | mkdir -p /mnt/c/opt/local64/pgm/ cp -R wxWidgets /mnt/c/opt/local64/pgm/wxWidgets-${{ env.WXWIDGETS_VERSION }} @@ -370,6 +376,9 @@ jobs: ./otp_build release -a cp /mnt/c/opt/local64/pgm/wxWidgets-${{ env.WXWIDGETS_VERSION }}/3rdparty/webview2/runtimes/win-x64/native/WebView2Loader.dll $ERL_TOP/release/win32/erts-*/bin/ ./otp_build installer_win32 + echo "installer_name=$(ls release/win32/otp*.exe | xargs basename)" >> $GITHUB_OUTPUT + make release_tests + zip -r tests.zip release/tests - name: Upload installer uses: actions/upload-artifact@65c4c4a1ddee5b72f698fdd19549f0f0fb45cf08 # ratchet:actions/upload-artifact@v4.6.0 @@ -377,6 +386,12 @@ jobs: name: otp_win32_installer path: otp/release/win32/otp*.exe + - name: Upload tests + uses: actions/upload-artifact@v4.4.0 + with: + name: otp_tests + path: otp/tests.zip + build-flavors: name: Build Erlang/OTP (Types and Flavors) runs-on: ubuntu-latest @@ -493,6 +508,166 @@ jobs: - name: Run dialyzer run: docker run -v $PWD/:/github otp '/github/scripts/run-dialyzer' + test-windows: + name: Test Win64 Erlang/OTP + needs: [pack, build-windows] + defaults: + run: + shell: wsl-bash {0} + runs-on: windows-2022 + if: needs.pack.outputs.changes != '[]' + strategy: + matrix: + # type: ${{ fromJson(needs.pack.outputs.all) }} + type: ${{ fromJson(needs.pack.outputs.changes) }} + # type: ["os_mon","sasl"] + fail-fast: false + steps: + - uses: Vampire/setup-wsl@v3.1.1 + with: + distribution: Ubuntu-18.04 + - name: Install WSL dependencies + run: apt update && apt install -y g++-mingw-w64 gcc-mingw-w64 make autoconf unzip zip + - name: Download installer + uses: actions/download-artifact@v4.1.8 + with: + name: otp_win32_installer + - name: Download tests + uses: actions/download-artifact@v4.1.8 + with: + name: otp_tests + + - name: Install OTP + shell: cmd + run: | + echo %cd% + start "" /WAIT ${{ needs.build-windows.outputs.installer_name }} /S /D=%CD%\release\win32\ + dir %cd% + dir %cd%\release\win32\ + + - name: Download source archive + uses: actions/download-artifact@v4.1.8 + with: + name: otp_prebuilt + + - name: Run tests + id: run-tests + run: | + set -x + unzip -q tests.zip + + tar -xzf ./otp_src.tar.gz + + export ERL_TOP="$(pwd)/otp" + export MAKEFLAGS=-j$(($(nproc) + 2)) + + eval `./otp/otp_build env_win32 x64` + + export PATH=`pwd`/release/win32/bin/:$PATH + + APP="${{ matrix.type }}" + TYPE=opt + ## Need to specialize for epmd, emulator and debug + case "${APP}" in + debug) + echo "No debug tests on windows" + ;; + *) + (cd release/tests/test_server && erl.exe -emu_type $TYPE -noshell -eval "ts:install()" -eval "ts:run($APP,[batch])" -s init stop) + if grep "^=result[ ]*failed:" release/tests/test_server/ct_run.*/tests.${APP}_test.logs/run*/suite.log; then + exit 1 + fi + ;; + esac + + - name: Cleanup tests + if: ${{ !cancelled() && matrix.type != 'debug' }} + run: tar czf ${{ matrix.type }}_win32_test_results.tar.gz release/tests/test_server + - name: Upload test results + uses: actions/upload-artifact@v4.4.0 + if: ${{ !cancelled() && matrix.type != 'debug' }} + with: + name: ${{ matrix.type }}_win32_test_results + path: ${{ matrix.type }}_win32_test_results.tar.gz + + system-test-windows: + name: Test Win64 Erlang/OTP (system) + defaults: + run: + shell: wsl-bash {0} + runs-on: windows-2022 + if: ${{ !cancelled() }} # Run even if the need has failed + needs: [test-windows, build-windows] + steps: + - uses: Vampire/setup-wsl@v3.1.1 + with: + distribution: Ubuntu-18.04 + - name: Install WSL dependencies + run: apt update && apt install -y g++-mingw-w64 gcc-mingw-w64 make autoconf unzip zip + - name: Download installer + uses: actions/download-artifact@v4.1.8 + with: + name: otp_win32_installer + - name: Download tests + uses: actions/download-artifact@v4.1.8 + with: + name: otp_tests + + - name: Install OTP + shell: cmd + run: | + echo %cd% + start "" /WAIT ${{ needs.build-windows.outputs.installer_name }} /S /D=%CD%\release\win32\ + dir %cd% + dir %cd%\release\win32\ + + - name: Download source archive + uses: actions/download-artifact@v4.1.8 + with: + name: otp_prebuilt + + - name: Download test results + uses: actions/download-artifact@v4.1.8 + - name: Merge test results + run: | + shopt -s nullglob + for file in *_win32_test_results/*.tar.gz; do + tar xvzf $file + done + export PATH=`pwd`/release/win32/bin/:$PATH + cd release/tests/test_server && ct_run.exe -noshell -refresh_logs $(wslpath -w `pwd`) + + - name: Run system tests + run: | + set -x + unzip -q -o tests.zip + + tar -xzf ./otp_src.tar.gz + + export ERL_TOP="$(pwd)/otp" + export MAKEFLAGS=-j$(($(nproc) + 2)) + + eval `./otp/otp_build env_win32 x64` + + export PATH=`pwd`/release/win32/bin/:$PATH + + (cd release/tests/test_server && erl.exe -noshell -eval "ts:install()" -eval "ts:run(system,[batch])" -s init stop) + if grep "^=result[ ]*failed:" release/tests/test_server/ct_run.*/tests.system_test.logs/run*/suite.log; then + exit 1 + fi + + - name: Cleanup tests + if: ${{ !cancelled() }} + run: | + tar czf test_results_win32.tar.gz release/tests/test_server + + - name: Upload test results + uses: actions/upload-artifact@v4.4.0 + if: ${{ !cancelled() }} + with: + name: test_results_win32 + path: test_results_win32.tar.gz + test: name: Test Erlang/OTP runs-on: ubuntu-latest @@ -544,13 +719,13 @@ jobs: run: | rm -rf make_test_dir/otp || true sudo bash -c "chown -R `whoami` make_test_dir && chmod -R +r make_test_dir" - tar czf ${{ matrix.type }}_test_results.tar.gz make_test_dir + tar czf ${{ matrix.type }}_ubuntu_test_results.tar.gz make_test_dir - name: Upload test results uses: actions/upload-artifact@65c4c4a1ddee5b72f698fdd19549f0f0fb45cf08 # ratchet:actions/upload-artifact@v4.6.0 if: ${{ !cancelled() }} with: - name: ${{ matrix.type }}_test_results - path: ${{ matrix.type }}_test_results.tar.gz + name: ${{ matrix.type }}_ubuntu_test_results + path: ${{ matrix.type }}_ubuntu_test_results.tar.gz system-test: name: Test Erlang/OTP (system) @@ -568,7 +743,7 @@ jobs: run: | shopt -s nullglob mkdir -p make_test_dir - for file in *_test_results/*.tar.gz; do + for file in *_ubuntu_test_results/*.tar.gz; do tar xzf $file done docker run -v $PWD/make_test_dir:/buildroot/otp/erts/make_test_dir otp \ diff --git a/make/test_target_script.sh b/make/test_target_script.sh index 868436a3c5ce..3900a4ce880a 100755 --- a/make/test_target_script.sh +++ b/make/test_target_script.sh @@ -27,6 +27,14 @@ LIGHT_CYAN='\033[1;36m' BOLD='\033[1m' NC='\033[0m' +ERL=erl +WIN_ERL_TOP="$ERL_TOP" + +if [ "${WSLcross}" = "true" ] +then + ERL=erl.exe + WIN_ERL_TOP=$(w32_path.sh -m "$ERL_TOP") +fi print_highlighted_msg_with_printer () { COLOR=$1 @@ -169,8 +177,8 @@ then echo "The tests will start in a few seconds..." sleep 45 cd "$ERL_TOP/release/tests/test_server" - erl -noinput -eval "ts:install(),erlang:halt()" - erl -noinput -eval "ts:run([all_tests,batch]),erlang:halt()" + $ERL -noinput -eval "ts:install(),erlang:halt()" + $ERL -noinput -eval "ts:run([all_tests,batch]),erlang:halt()" exit $? fi @@ -271,7 +279,7 @@ fi # Compile test server and configure if [ ! -f "$ERL_TOP/lib/common_test/test_server/variables" ]; then cd "$ERL_TOP/lib/common_test/test_server" - ( ${MAKE:-make} && erl -noshell -eval "ts:install()." -s init stop ) > "$INSTALL_TEST_LOG" 2>&1 + ( ${MAKE:-make} && $ERL -noshell -eval "ts:install()." -s init stop ) > "$INSTALL_TEST_LOG" 2>&1 if [ $? != 0 ] then cat "$INSTALL_TEST_LOG" @@ -283,8 +291,8 @@ fi # Run ct_run cd $MAKE_TEST_REL_DIR -erl -sname test -noshell -pa "$ERL_TOP/lib/common_test/test_server" \ - -eval "ts:compile_datadirs(\"$ERL_TOP/lib/common_test/test_server/variables\",\"*_SUITE_data\")."\ +$ERL -sname test -noshell -pa "$WIN_ERL_TOP/lib/common_test/test_server" \ + -eval "ts:compile_datadirs(\"$WIN_ERL_TOP/lib/common_test/test_server/variables\",\"*_SUITE_data\")."\ -s init stop > "$COMPILE_TEST_LOG" 2>&1 if [ $? != 0 ] @@ -322,7 +330,6 @@ then else WIN_MAKE_TEST_CT_LOGS=`w32_path.sh -m "$MAKE_TEST_CT_LOGS"` WIN_MAKE_TEST_DIR=`w32_path.sh -m "$MAKE_TEST_DIR"` - WIN_ERL_TOP=`w32_path.sh -m "$ERL_TOP"` "$CT_RUN.exe" -logdir $WIN_MAKE_TEST_CT_LOGS\ -pa "$WIN_ERL_TOP/lib/common_test/test_server"\ -config "$WIN_ERL_TOP/lib/common_test/test_server/ts.config"\ From 3f04fb1680da53919b89e711067b66fd9619506f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Lukas=20Backstr=C3=B6m?= Date: Wed, 23 Oct 2024 16:01:41 +0200 Subject: [PATCH 11/25] Add setup-wsl-runner action --- .github/actions/setup-wsl-runner/action.yaml | 44 ++++++++++++++ .github/workflows/main.yaml | 63 ++------------------ 2 files changed, 49 insertions(+), 58 deletions(-) create mode 100644 .github/actions/setup-wsl-runner/action.yaml diff --git a/.github/actions/setup-wsl-runner/action.yaml b/.github/actions/setup-wsl-runner/action.yaml new file mode 100644 index 000000000000..f511370fee9d --- /dev/null +++ b/.github/actions/setup-wsl-runner/action.yaml @@ -0,0 +1,44 @@ +name: Setup Windows WSL Runner +description: 'Setup a WSL Runner for building and testing Erlang/OTP' + +inputs: + SETUP_TEST: + default: false + github_token: + description: 'GITHUB_TOKEN' + default: '${{ github.token }}' + +runs: + using: composite + steps: + - uses: Vampire/setup-wsl@v3.1.3 + with: + distribution: Ubuntu-18.04 + + - name: Install WSL dependencies + run: apt update && apt install -y g++-mingw-w64 gcc-mingw-w64 make autoconf unzip zip + + - name: Download source archive + uses: actions/download-artifact@v4.1.8 + with: + name: otp_prebuilt + + - name: Download installer + if: inputs.SETUP_TEST == 'true' + uses: actions/download-artifact@v4.1.8 + with: + name: otp_win32_installer + - name: Download tests + if: inputs.SETUP_TEST == 'true' + uses: actions/download-artifact@v4.1.8 + with: + name: otp_tests + + - name: Install OTP + if: inputs.SETUP_TEST == 'true' + shell: cmd + run: | + echo %cd% + start "" /WAIT ${{ needs.build-windows.outputs.installer_name }} /S /D=%CD%\release\win32\ + dir %cd% + dir %cd%\release\win32\ \ No newline at end of file diff --git a/.github/workflows/main.yaml b/.github/workflows/main.yaml index d261dbd808ae..482386fe689c 100644 --- a/.github/workflows/main.yaml +++ b/.github/workflows/main.yaml @@ -291,12 +291,7 @@ jobs: installer_name: ${{ steps.compile-erlang.outputs.installer_name }} steps: - - uses: Vampire/setup-wsl@5ff2c045a05fd477a71b5419d50c5a228a52468e # ratchet:Vampire/setup-wsl@v4.1.0 - with: - distribution: Ubuntu-18.04 - - - name: Install WSL dependencies - run: apt update && apt install -y make autoconf unzip zip + - uses: ./.github/actions/setup-wsl-runner - name: Install openssl shell: cmd @@ -523,32 +518,9 @@ jobs: # type: ["os_mon","sasl"] fail-fast: false steps: - - uses: Vampire/setup-wsl@v3.1.1 + - uses: ./.github/actions/setup-wsl-runner with: - distribution: Ubuntu-18.04 - - name: Install WSL dependencies - run: apt update && apt install -y g++-mingw-w64 gcc-mingw-w64 make autoconf unzip zip - - name: Download installer - uses: actions/download-artifact@v4.1.8 - with: - name: otp_win32_installer - - name: Download tests - uses: actions/download-artifact@v4.1.8 - with: - name: otp_tests - - - name: Install OTP - shell: cmd - run: | - echo %cd% - start "" /WAIT ${{ needs.build-windows.outputs.installer_name }} /S /D=%CD%\release\win32\ - dir %cd% - dir %cd%\release\win32\ - - - name: Download source archive - uses: actions/download-artifact@v4.1.8 - with: - name: otp_prebuilt + SETUP_TEST: true - name: Run tests id: run-tests @@ -599,35 +571,10 @@ jobs: if: ${{ !cancelled() }} # Run even if the need has failed needs: [test-windows, build-windows] steps: - - uses: Vampire/setup-wsl@v3.1.1 + - uses: ./.github/actions/setup-wsl-runner with: - distribution: Ubuntu-18.04 - - name: Install WSL dependencies - run: apt update && apt install -y g++-mingw-w64 gcc-mingw-w64 make autoconf unzip zip - - name: Download installer - uses: actions/download-artifact@v4.1.8 - with: - name: otp_win32_installer - - name: Download tests - uses: actions/download-artifact@v4.1.8 - with: - name: otp_tests - - - name: Install OTP - shell: cmd - run: | - echo %cd% - start "" /WAIT ${{ needs.build-windows.outputs.installer_name }} /S /D=%CD%\release\win32\ - dir %cd% - dir %cd%\release\win32\ - - - name: Download source archive - uses: actions/download-artifact@v4.1.8 - with: - name: otp_prebuilt + SETUP_TEST: true - - name: Download test results - uses: actions/download-artifact@v4.1.8 - name: Merge test results run: | shopt -s nullglob From 36d5625f43a828b9e2019432c8b31a7f47c0c4df Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Lukas=20Backstr=C3=B6m?= Date: Wed, 23 Oct 2024 16:14:32 +0200 Subject: [PATCH 12/25] fixup! Add setup-wsl-runner action --- .github/workflows/main.yaml | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/.github/workflows/main.yaml b/.github/workflows/main.yaml index 482386fe689c..b45e0996311a 100644 --- a/.github/workflows/main.yaml +++ b/.github/workflows/main.yaml @@ -291,6 +291,7 @@ jobs: installer_name: ${{ steps.compile-erlang.outputs.installer_name }} steps: + - uses: actions/checkout@v4.2.1 - uses: ./.github/actions/setup-wsl-runner - name: Install openssl @@ -518,6 +519,7 @@ jobs: # type: ["os_mon","sasl"] fail-fast: false steps: + - uses: actions/checkout@v4.2.1 - uses: ./.github/actions/setup-wsl-runner with: SETUP_TEST: true @@ -528,12 +530,10 @@ jobs: set -x unzip -q tests.zip - tar -xzf ./otp_src.tar.gz - export ERL_TOP="$(pwd)/otp" export MAKEFLAGS=-j$(($(nproc) + 2)) - eval `./otp/otp_build env_win32 x64` + eval `./otp_build env_win32 x64` export PATH=`pwd`/release/win32/bin/:$PATH @@ -571,6 +571,7 @@ jobs: if: ${{ !cancelled() }} # Run even if the need has failed needs: [test-windows, build-windows] steps: + - uses: actions/checkout@v4.2.1 - uses: ./.github/actions/setup-wsl-runner with: SETUP_TEST: true @@ -589,12 +590,10 @@ jobs: set -x unzip -q -o tests.zip - tar -xzf ./otp_src.tar.gz - export ERL_TOP="$(pwd)/otp" export MAKEFLAGS=-j$(($(nproc) + 2)) - eval `./otp/otp_build env_win32 x64` + eval `./otp_build env_win32 x64` export PATH=`pwd`/release/win32/bin/:$PATH From f8fa9933733ad2ec93fcf868cde427eea093967f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Lukas=20Backstr=C3=B6m?= Date: Wed, 23 Oct 2024 16:35:59 +0200 Subject: [PATCH 13/25] fixup! fixup! Add setup-wsl-runner action --- .github/actions/setup-wsl-runner/action.yaml | 11 ++++++----- .github/workflows/main.yaml | 4 ++-- 2 files changed, 8 insertions(+), 7 deletions(-) diff --git a/.github/actions/setup-wsl-runner/action.yaml b/.github/actions/setup-wsl-runner/action.yaml index f511370fee9d..2ae36a709719 100644 --- a/.github/actions/setup-wsl-runner/action.yaml +++ b/.github/actions/setup-wsl-runner/action.yaml @@ -2,7 +2,7 @@ name: Setup Windows WSL Runner description: 'Setup a WSL Runner for building and testing Erlang/OTP' inputs: - SETUP_TEST: + installer_name: default: false github_token: description: 'GITHUB_TOKEN' @@ -16,6 +16,7 @@ runs: distribution: Ubuntu-18.04 - name: Install WSL dependencies + shell: wsl-bash {0} run: apt update && apt install -y g++-mingw-w64 gcc-mingw-w64 make autoconf unzip zip - name: Download source archive @@ -24,21 +25,21 @@ runs: name: otp_prebuilt - name: Download installer - if: inputs.SETUP_TEST == 'true' + if: inputs.SETUP_TEST != 'false' uses: actions/download-artifact@v4.1.8 with: name: otp_win32_installer - name: Download tests - if: inputs.SETUP_TEST == 'true' + if: inputs.SETUP_TEST != 'false' uses: actions/download-artifact@v4.1.8 with: name: otp_tests - name: Install OTP - if: inputs.SETUP_TEST == 'true' + if: inputs.SETUP_TEST != 'false' shell: cmd run: | echo %cd% - start "" /WAIT ${{ needs.build-windows.outputs.installer_name }} /S /D=%CD%\release\win32\ + start "" /WAIT ${{ inputs.installer_name }} /S /D=%CD%\release\win32\ dir %cd% dir %cd%\release\win32\ \ No newline at end of file diff --git a/.github/workflows/main.yaml b/.github/workflows/main.yaml index b45e0996311a..3c855d21cb1f 100644 --- a/.github/workflows/main.yaml +++ b/.github/workflows/main.yaml @@ -522,7 +522,7 @@ jobs: - uses: actions/checkout@v4.2.1 - uses: ./.github/actions/setup-wsl-runner with: - SETUP_TEST: true + installer_name: ${ needs.build-windows.outputs.installer_name } - name: Run tests id: run-tests @@ -574,7 +574,7 @@ jobs: - uses: actions/checkout@v4.2.1 - uses: ./.github/actions/setup-wsl-runner with: - SETUP_TEST: true + installer_name: ${ needs.build-windows.outputs.installer_name } - name: Merge test results run: | From 3df1a5288b2de17945583e0f6b82bbb65c14388e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Lukas=20Backstr=C3=B6m?= Date: Wed, 23 Oct 2024 16:58:33 +0200 Subject: [PATCH 14/25] fixup! fixup! Add setup-wsl-runner action --- .github/actions/setup-wsl-runner/action.yaml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/actions/setup-wsl-runner/action.yaml b/.github/actions/setup-wsl-runner/action.yaml index 2ae36a709719..7aa03e53e329 100644 --- a/.github/actions/setup-wsl-runner/action.yaml +++ b/.github/actions/setup-wsl-runner/action.yaml @@ -25,18 +25,18 @@ runs: name: otp_prebuilt - name: Download installer - if: inputs.SETUP_TEST != 'false' + if: inputs.installer_name != 'false' uses: actions/download-artifact@v4.1.8 with: name: otp_win32_installer - name: Download tests - if: inputs.SETUP_TEST != 'false' + if: inputs.installer_name != 'false' uses: actions/download-artifact@v4.1.8 with: name: otp_tests - name: Install OTP - if: inputs.SETUP_TEST != 'false' + if: inputs.installer_name != 'false' shell: cmd run: | echo %cd% From c69cccc65d4d433f54a4925fb01f7917b3be36ca Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Lukas=20Backstr=C3=B6m?= Date: Wed, 23 Oct 2024 20:51:06 +0200 Subject: [PATCH 15/25] fixup! fixup! fixup! Add setup-wsl-runner action --- .github/actions/setup-wsl-runner/action.yaml | 1 + .github/workflows/main.yaml | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/.github/actions/setup-wsl-runner/action.yaml b/.github/actions/setup-wsl-runner/action.yaml index 7aa03e53e329..e618504fcb3c 100644 --- a/.github/actions/setup-wsl-runner/action.yaml +++ b/.github/actions/setup-wsl-runner/action.yaml @@ -29,6 +29,7 @@ runs: uses: actions/download-artifact@v4.1.8 with: name: otp_win32_installer + - name: Download tests if: inputs.installer_name != 'false' uses: actions/download-artifact@v4.1.8 diff --git a/.github/workflows/main.yaml b/.github/workflows/main.yaml index 3c855d21cb1f..added099d3fb 100644 --- a/.github/workflows/main.yaml +++ b/.github/workflows/main.yaml @@ -522,7 +522,7 @@ jobs: - uses: actions/checkout@v4.2.1 - uses: ./.github/actions/setup-wsl-runner with: - installer_name: ${ needs.build-windows.outputs.installer_name } + installer_name: ${{ needs.build-windows.outputs.installer_name }} - name: Run tests id: run-tests From 5252c25b0192b07fbdf945dab61eff12e3be1bfe Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Lukas=20Backstr=C3=B6m?= Date: Wed, 23 Oct 2024 21:44:37 +0200 Subject: [PATCH 16/25] Fix win ci --- .github/workflows/main.yaml | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/.github/workflows/main.yaml b/.github/workflows/main.yaml index added099d3fb..42b382c38aae 100644 --- a/.github/workflows/main.yaml +++ b/.github/workflows/main.yaml @@ -530,9 +530,13 @@ jobs: set -x unzip -q tests.zip - export ERL_TOP="$(pwd)/otp" + export ERL_TOP="$(pwd)" export MAKEFLAGS=-j$(($(nproc) + 2)) + cat otp_build + + ./otp_build env_win32 x64 + eval `./otp_build env_win32 x64` export PATH=`pwd`/release/win32/bin/:$PATH From affac0caad97343b1c7a228d0df97774c54a0e31 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Lukas=20Backstr=C3=B6m?= Date: Wed, 23 Oct 2024 21:45:06 +0200 Subject: [PATCH 17/25] Disable push trigger --- .github/workflows/main.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/main.yaml b/.github/workflows/main.yaml index 42b382c38aae..f1a172fd61a2 100644 --- a/.github/workflows/main.yaml +++ b/.github/workflows/main.yaml @@ -34,7 +34,7 @@ name: Build and check Erlang/OTP on: - push: + #push: pull_request: schedule: - cron: 0 1 * * * From 32ab7e48194041d8460e52f108a70f3316312978 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Lukas=20Backstr=C3=B6m?= Date: Thu, 24 Oct 2024 08:55:15 +0200 Subject: [PATCH 18/25] Win CI --- .github/workflows/main.yaml | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/.github/workflows/main.yaml b/.github/workflows/main.yaml index f1a172fd61a2..13f8b7cc6426 100644 --- a/.github/workflows/main.yaml +++ b/.github/workflows/main.yaml @@ -529,15 +529,16 @@ jobs: run: | set -x unzip -q tests.zip - export ERL_TOP="$(pwd)" export MAKEFLAGS=-j$(($(nproc) + 2)) + export + cat otp_build - ./otp_build env_win32 x64 + bash ./otp_build env_win32 x64 - eval `./otp_build env_win32 x64` + eval `bash ./otp_build env_win32 x64` export PATH=`pwd`/release/win32/bin/:$PATH From fe74b242c9ec52a95397fc825e2be1b47fc021bf Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Lukas=20Backstr=C3=B6m?= Date: Thu, 24 Oct 2024 09:53:17 +0200 Subject: [PATCH 19/25] Fix CI --- .github/workflows/main.yaml | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/.github/workflows/main.yaml b/.github/workflows/main.yaml index 13f8b7cc6426..7d761476769d 100644 --- a/.github/workflows/main.yaml +++ b/.github/workflows/main.yaml @@ -519,6 +519,9 @@ jobs: # type: ["os_mon","sasl"] fail-fast: false steps: + - name: Setup nl behaviour for wsl + shell: cmd + run: git config --global core.autocrlf input - uses: actions/checkout@v4.2.1 - uses: ./.github/actions/setup-wsl-runner with: @@ -532,13 +535,7 @@ jobs: export ERL_TOP="$(pwd)" export MAKEFLAGS=-j$(($(nproc) + 2)) - export - - cat otp_build - - bash ./otp_build env_win32 x64 - - eval `bash ./otp_build env_win32 x64` + eval `./otp_build env_win32 x64` export PATH=`pwd`/release/win32/bin/:$PATH @@ -576,6 +573,9 @@ jobs: if: ${{ !cancelled() }} # Run even if the need has failed needs: [test-windows, build-windows] steps: + - name: Setup nl behaviour for wsl + shell: cmd + run: git config --global core.autocrlf input - uses: actions/checkout@v4.2.1 - uses: ./.github/actions/setup-wsl-runner with: From 3d1fb33f9df43424b063dcf445e0a0f570a362d0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Lukas=20Backstr=C3=B6m?= Date: Fri, 25 Oct 2024 13:33:07 +0200 Subject: [PATCH 20/25] Only need gcc+g++ when building interpreter --- .github/actions/setup-wsl-runner/action.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/actions/setup-wsl-runner/action.yaml b/.github/actions/setup-wsl-runner/action.yaml index e618504fcb3c..f20cbf292e57 100644 --- a/.github/actions/setup-wsl-runner/action.yaml +++ b/.github/actions/setup-wsl-runner/action.yaml @@ -17,7 +17,7 @@ runs: - name: Install WSL dependencies shell: wsl-bash {0} - run: apt update && apt install -y g++-mingw-w64 gcc-mingw-w64 make autoconf unzip zip + run: apt update && apt install -y make autoconf unzip zip - name: Download source archive uses: actions/download-artifact@v4.1.8 From 8b160c3201c850e90e933f8b22af1c10d6188cae Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Lukas=20Backstr=C3=B6m?= Date: Fri, 25 Oct 2024 13:33:33 +0200 Subject: [PATCH 21/25] Setup correct nl endings on windows --- .github/workflows/main.yaml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/.github/workflows/main.yaml b/.github/workflows/main.yaml index 7d761476769d..a78dca611d8d 100644 --- a/.github/workflows/main.yaml +++ b/.github/workflows/main.yaml @@ -291,6 +291,9 @@ jobs: installer_name: ${{ steps.compile-erlang.outputs.installer_name }} steps: + - name: Setup nl behaviour for wsl + shell: cmd + run: git config --global core.autocrlf input - uses: actions/checkout@v4.2.1 - uses: ./.github/actions/setup-wsl-runner From d77c51f4cc981295d5485c2e3edcf9667076eb91 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Lukas=20Backstr=C3=B6m?= Date: Fri, 25 Oct 2024 13:33:44 +0200 Subject: [PATCH 22/25] Run all tests --- .github/workflows/main.yaml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/main.yaml b/.github/workflows/main.yaml index a78dca611d8d..1406ea10432e 100644 --- a/.github/workflows/main.yaml +++ b/.github/workflows/main.yaml @@ -517,8 +517,8 @@ jobs: if: needs.pack.outputs.changes != '[]' strategy: matrix: - # type: ${{ fromJson(needs.pack.outputs.all) }} - type: ${{ fromJson(needs.pack.outputs.changes) }} + type: ${{ fromJson(needs.pack.outputs.all) }} + # type: ${{ fromJson(needs.pack.outputs.changes) }} # type: ["os_mon","sasl"] fail-fast: false steps: From 9969806ae6120a01235445886e5ae1cb21f2e079 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Lukas=20Backstr=C3=B6m?= Date: Tue, 29 Oct 2024 14:28:44 +0100 Subject: [PATCH 23/25] Polish CI --- .github/actions/setup-wsl-runner/action.yaml | 4 ++++ .github/workflows/main.yaml | 6 +++--- erts/emulator/test/smoke_test_SUITE.erl | 10 +++++----- 3 files changed, 12 insertions(+), 8 deletions(-) diff --git a/.github/actions/setup-wsl-runner/action.yaml b/.github/actions/setup-wsl-runner/action.yaml index f20cbf292e57..6c6fd4095a25 100644 --- a/.github/actions/setup-wsl-runner/action.yaml +++ b/.github/actions/setup-wsl-runner/action.yaml @@ -11,6 +11,10 @@ inputs: runs: using: composite steps: + - name: Set timezone to CET + shell: cmd + run: tzutil /s "Europe/Stockholm" + - uses: Vampire/setup-wsl@v3.1.3 with: distribution: Ubuntu-18.04 diff --git a/.github/workflows/main.yaml b/.github/workflows/main.yaml index 1406ea10432e..ccea3a801f3e 100644 --- a/.github/workflows/main.yaml +++ b/.github/workflows/main.yaml @@ -373,7 +373,7 @@ jobs: fi ./otp_build boot -a ./otp_build release -a - cp /mnt/c/opt/local64/pgm/wxWidgets-${{ env.WXWIDGETS_VERSION }}/3rdparty/webview2/runtimes/win-x64/native/WebView2Loader.dll $ERL_TOP/release/win32/erts-*/bin/ + ./otp_build debuginfo_win32 ./otp_build installer_win32 echo "installer_name=$(ls release/win32/otp*.exe | xargs basename)" >> $GITHUB_OUTPUT make release_tests @@ -550,7 +550,7 @@ jobs: echo "No debug tests on windows" ;; *) - (cd release/tests/test_server && erl.exe -emu_type $TYPE -noshell -eval "ts:install()" -eval "ts:run($APP,[batch])" -s init stop) + (cd release/tests/test_server && erl.exe -env USER ${USER} -emu_type $TYPE -noinput -eval "ts:install()" -eval "ts:run($APP,[batch])" -s init stop) if grep "^=result[ ]*failed:" release/tests/test_server/ct_run.*/tests.${APP}_test.logs/run*/suite.log; then exit 1 fi @@ -582,7 +582,7 @@ jobs: - uses: actions/checkout@v4.2.1 - uses: ./.github/actions/setup-wsl-runner with: - installer_name: ${ needs.build-windows.outputs.installer_name } + installer_name: ${{ needs.build-windows.outputs.installer_name }} - name: Merge test results run: | diff --git a/erts/emulator/test/smoke_test_SUITE.erl b/erts/emulator/test/smoke_test_SUITE.erl index b59390a85482..f99761e51cad 100644 --- a/erts/emulator/test/smoke_test_SUITE.erl +++ b/erts/emulator/test/smoke_test_SUITE.erl @@ -102,16 +102,16 @@ native_atomics(Config) when is_list(Config) -> end. jump_table(Config) when is_list(Config) -> - case erlang:system_info(beam_jump_table) of - true -> - ok; - false -> + case {erlang:system_info(beam_jump_table), + erlang:system_info(emu_flavor)} of + {false, emu} -> case erlang:system_info(build_type) of opt -> ct:fail(optimized_without_beam_jump_table); BT -> {comment, "No beam jump table, but build type is " ++ atom_to_list(BT)} - end + end; + _ -> ok end. From 8270aec577868e6da8bfc5d93b536b8955969b77 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Lukas=20Backstr=C3=B6m?= Date: Wed, 30 Oct 2024 09:05:32 +0100 Subject: [PATCH 24/25] tzutil fix --- .github/actions/setup-wsl-runner/action.yaml | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/.github/actions/setup-wsl-runner/action.yaml b/.github/actions/setup-wsl-runner/action.yaml index 6c6fd4095a25..e7440d732805 100644 --- a/.github/actions/setup-wsl-runner/action.yaml +++ b/.github/actions/setup-wsl-runner/action.yaml @@ -13,7 +13,9 @@ runs: steps: - name: Set timezone to CET shell: cmd - run: tzutil /s "Europe/Stockholm" + run: | + tzutil /l + tzutil /s "W. Europe Standard Time" - uses: Vampire/setup-wsl@v3.1.3 with: From 94883ff0c8274d8799d4f0e812f1983a29c88804 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Lukas=20Backstr=C3=B6m?= Date: Wed, 30 Oct 2024 11:57:51 +0100 Subject: [PATCH 25/25] Fix system test windows --- .github/actions/setup-wsl-runner/action.yaml | 4 +--- .github/workflows/main.yaml | 2 ++ 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/actions/setup-wsl-runner/action.yaml b/.github/actions/setup-wsl-runner/action.yaml index e7440d732805..5d30fd6ad0aa 100644 --- a/.github/actions/setup-wsl-runner/action.yaml +++ b/.github/actions/setup-wsl-runner/action.yaml @@ -13,9 +13,7 @@ runs: steps: - name: Set timezone to CET shell: cmd - run: | - tzutil /l - tzutil /s "W. Europe Standard Time" + run: tzutil /s "W. Europe Standard Time" - uses: Vampire/setup-wsl@v3.1.3 with: diff --git a/.github/workflows/main.yaml b/.github/workflows/main.yaml index ccea3a801f3e..6639f151a65b 100644 --- a/.github/workflows/main.yaml +++ b/.github/workflows/main.yaml @@ -584,6 +584,8 @@ jobs: with: installer_name: ${{ needs.build-windows.outputs.installer_name }} + - name: Download test results + uses: actions/download-artifact@v4.1.8 - name: Merge test results run: | shopt -s nullglob