Skip to content

Commit

Permalink
Update MSVC & MSYS1 CI
Browse files Browse the repository at this point in the history
  • Loading branch information
ddeclerck committed Jul 31, 2024
1 parent 00f6832 commit a672fbb
Show file tree
Hide file tree
Showing 2 changed files with 54 additions and 27 deletions.
57 changes: 33 additions & 24 deletions .github/workflows/windows-msvc.yml
Original file line number Diff line number Diff line change
Expand Up @@ -154,27 +154,23 @@ jobs:
run: |
pacman --needed --noconfirm -S $MSYSPKGS
- name: Build testsuite
- name: Adjust testsuite
shell: C:\shells\msys2bash.cmd {0}
run: |
cd tests
echo at_testdir=\'tests\' > atconfig
echo abs_builddir=\'$(pwd)\' >> atconfig
echo at_srcdir=\'./\' >> atconfig
echo abs_srcdir=\'$(pwd)/\' >> atconfig
echo at_top_srcdir=\'../\' >> atconfig
echo abs_top_srcdir=\'$(pwd)/../\' >> atconfig
echo at_top_build_prefix=\'../\' >> atconfig
echo abs_top_builddir=\'$(pwd)/../\' >> atconfig
echo at_top_builddir=\$at_top_build_prefix >> atconfig
echo EXEEXT=\'.exe\' >> atconfig
echo AUTOTEST_PATH=\'tests\' >> atconfig
echo SHELL=\${CONFIG_SHELL-\'/bin/sh\'} >> atconfig
echo m4_define\([AT_PACKAGE_STRING], [$GC_VERSION]\) > package.m4
echo m4_define\([AT_PACKAGE_BUGREPORT], [[email protected]]\) >> package.m4
sed 's/x64\/Debug/${{ env.ARCHDIR }}\/${{ matrix.target }}/g' atlocal_win > atlocal
sed -i '/AT_SETUP(\[runtime check: write to internal storage (1)\])/a AT_SKIP_IF(\[true\])' testsuite.src/run_misc.at
- name: Adjust testsuite for Debug target
if: ${{ matrix.target == 'Debug' }}
shell: C:\shells\msys2bash.cmd {0}
run: |
cd tests
sed -i '/AT_SETUP(\[MF FIGURATIVE to NUMERIC\])/a AT_SKIP_IF(\[true\])' testsuite.src/run_misc.at
sed -i '/AT_SETUP(\[Default file external name\])/a AT_SKIP_IF(\[true\])' testsuite.src/run_file.at
sed -i '/AT_SETUP(\[EXTFH: SEQUENTIAL files\])/a AT_SKIP_IF(\[true\])' testsuite.src/run_file.at
sed -i '/AT_SETUP(\[System routine CBL_GC_HOSTED\])/a AT_SKIP_IF(\[true\])' testsuite.src/run_extensions.at
sed -i '/AT_SETUP(\[MOVE to edited item (4)\])/a AT_SKIP_IF(\[true\])' testsuite.src/run_fundamental.at
sed -i '/AT_SETUP(\[MOVE to item with simple and floating insertion\])/a AT_SKIP_IF(\[true\])' testsuite.src/run_fundamental.at
sed -i '/AT_SETUP(\[Numeric operations (1)\])/a AT_SKIP_IF(\[true\])' testsuite.src/run_fundamental.at
Expand All @@ -189,6 +185,7 @@ jobs:
sed -i '/AT_SETUP(\[OSVS Arithmetic Test (2)\])/a AT_SKIP_IF(\[true\])' testsuite.src/run_misc.at
sed -i '/AT_SETUP(\[FUNCTION ACOS\])/a AT_SKIP_IF(\[true\])' testsuite.src/run_functions.at
sed -i '/AT_SETUP(\[FUNCTION ASIN\])/a AT_SKIP_IF(\[true\])' testsuite.src/run_functions.at
sed -i '/AT_SETUP(\[FUNCTION RANDOM\])/a AT_SKIP_IF(\[true\])' testsuite.src/run_functions.at
sed -i '/AT_SETUP(\[MOVE of non-integer to alphanumeric\])/a AT_SKIP_IF(\[true\])' testsuite.src/run_extensions.at
sed -i '/AT_SETUP(\[XML GENERATE trimming\])/a AT_SKIP_IF(\[true\])' testsuite.src/run_ml.at
sed -i '/AT_SETUP(\[JSON GENERATE trimming\])/a AT_SKIP_IF(\[true\])' testsuite.src/run_ml.at
Expand All @@ -209,18 +206,30 @@ jobs:
sed -i '/AT_SETUP(\[BCD ADD and SUBTRACT, all ROUNDED MODEs\])/a AT_SKIP_IF(\[true\])' testsuite.src/data_packed.at
sed -i '/AT_SETUP(\[CURRENCY SIGN WITH PICTURE SYMBOL\])/a AT_SKIP_IF(\[true\])' testsuite.src/run_misc.at
sed -i '/AT_SETUP(\[MF FIGURATIVE to NUMERIC\])/a AT_SKIP_IF(\[true\])' testsuite.src/run_misc.at
sed -i '/AT_SETUP(\[Default file external name\])/a AT_SKIP_IF(\[true\])' testsuite.src/run_file.at
sed -i '/AT_SETUP(\[EXTFH: SEQUENTIAL files\])/a AT_SKIP_IF(\[true\])' testsuite.src/run_file.at
sed -i '/AT_SETUP(\[System routine CBL_GC_HOSTED\])/a AT_SKIP_IF(\[true\])' testsuite.src/run_extensions.at
sed -i '/AT_SETUP(\[FUNCTION RANDOM\])/a AT_SKIP_IF(\[true\])' testsuite.src/run_functions.at
# The tests in sed commands above randomly hang (under debug configurations)

- name: Build testsuite
shell: C:\shells\msys2bash.cmd {0}
run: |
cd tests
echo at_testdir=\'tests\' > atconfig
echo abs_builddir=\'$(pwd)\' >> atconfig
echo at_srcdir=\'./\' >> atconfig
echo abs_srcdir=\'$(pwd)/\' >> atconfig
echo at_top_srcdir=\'../\' >> atconfig
echo abs_top_srcdir=\'$(pwd)/../\' >> atconfig
echo at_top_build_prefix=\'../\' >> atconfig
echo abs_top_builddir=\'$(pwd)/../\' >> atconfig
echo at_top_builddir=\$at_top_build_prefix >> atconfig
echo EXEEXT=\'.exe\' >> atconfig
echo AUTOTEST_PATH=\'tests\' >> atconfig
echo SHELL=\${CONFIG_SHELL-\'/bin/sh\'} >> atconfig
echo m4_define\([AT_PACKAGE_STRING], [$GC_VERSION]\) > package.m4
echo m4_define\([AT_PACKAGE_BUGREPORT], [[email protected]]\) >> package.m4
sed 's/x64\/Debug/${{ env.ARCHDIR }}\/${{ matrix.target }}/g' atlocal_win > atlocal
autom4te --lang=autotest -I ./testsuite.src ./testsuite.at -o ./testsuite
# The tests in sed commands above randomly hang (under debug configurations)

- name: Run testsuite
continue-on-error: true
run: |
cd tests
set CL=/I "%VCPKG_ROOT%\installed\${{ matrix.arch }}-windows\include"
Expand Down
24 changes: 21 additions & 3 deletions .github/workflows/windows-msys1.yml
Original file line number Diff line number Diff line change
Expand Up @@ -173,7 +173,7 @@ jobs:
sed -i 'N;s/else/else :;/g' .\configure
sed -i 's/\} else \:;/} else/g' .\configure
sed -i 's/#else \:;/#else/g' .\configure
bash -lc "cd _build && ../configure %CFGOPT% --with-db --prefix=/opt/cobol/gnucobol"
bash -lc "cd _build && CFLAGS=\"-I ../libcob\" ../configure %CFGOPT% --with-db --prefix=/opt/cobol/gnucobol"
- name: Upload config-${{ matrix.target }}.log
uses: actions/upload-artifact@v4
Expand All @@ -200,9 +200,27 @@ jobs:
path: ${{ env.GITHUB_WORKSPACE }}/_build/install.log

- name: Run testsuite
continue-on-error: true
run: |
sed -i '/AT_SETUP(\[temporary path invalid\])/a AT_SKIP_IF(\[true\])' .\tests\testsuite.src\used_binaries.at
sed -i '/AT_SETUP(\[temporary path invalid\])/a AT_SKIP_IF(\[true\])' tests/testsuite.src/used_binaries.at
sed -i '/AT_SETUP(\[Compare FLOAT-LONG with floating-point literal\])/a AT_SKIP_IF(\[true\])' tests/testsuite.src/run_fundamental.at
sed -i '/AT_SETUP(\[Numeric operations (3) PACKED-DECIMAL\])/a AT_SKIP_IF(\[true\])' tests/testsuite.src/run_fundamental.at
sed -i '/AT_SETUP(\[Numeric operations (7)\])/a AT_SKIP_IF(\[true\])' tests/testsuite.src/run_fundamental.at
sed -i '/AT_SETUP(\[integer arithmetic on floating-point var\])/a AT_SKIP_IF(\[true\])' tests/testsuite.src/run_fundamental.at
sed -i '/AT_SETUP(\[FLOAT-DECIMAL w\/o SIZE ERROR\])/a AT_SKIP_IF(\[true\])' tests/testsuite.src/run_misc.at
sed -i '/AT_SETUP(\[FLOAT-SHORT \/ FLOAT-LONG w\/o SIZE ERROR\])/a AT_SKIP_IF(\[true\])' tests/testsuite.src/run_misc.at
sed -i '/AT_SETUP(\[FLOAT-LONG with SIZE ERROR\])/a AT_SKIP_IF(\[true\])' tests/testsuite.src/run_misc.at
sed -i '/AT_SETUP(\[FUNCTION ANNUITY\])/a AT_SKIP_IF(\[true\])' tests/testsuite.src/run_functions.at
sed -i '/AT_SETUP(\[FUNCTION INTEGER\])/a AT_SKIP_IF(\[true\])' tests/testsuite.src/run_functions.at
sed -i '/AT_SETUP(\[FUNCTION MOD (valid)\])/a AT_SKIP_IF(\[true\])' tests/testsuite.src/run_functions.at
sed -i '/AT_SETUP(\[FUNCTION SECONDS-FROM-FORMATTED-TIME\])/a AT_SKIP_IF(\[true\])' tests/testsuite.src/run_functions.at
sed -i '/AT_SETUP(\[GCOS floating-point usages\])/a AT_SKIP_IF(\[true\])' tests/testsuite.src/run_extensions.at
sed -i '/AT_SETUP(\[BINARY: 64bit unsigned arithmetic notrunc\])/a AT_SKIP_IF(\[true\])' tests/testsuite.src/data_binary.at
sed -i '/AT_SETUP(\[DISPLAY: ADD and SUBTRACT w\/o SIZE ERROR\])/a AT_SKIP_IF(\[true\])' tests/testsuite.src/data_display.at
sed -i '/AT_SETUP(\[DISPLAY: ADD and SUBTRACT, all ROUNDED MODEs\])/a AT_SKIP_IF(\[true\])' tests/testsuite.src/data_display.at
sed -i '/AT_SETUP(\[BCD ADD and SUBTRACT w\/o SIZE ERROR\])/a AT_SKIP_IF(\[true\])' tests/testsuite.src/data_packed.at
sed -i '/AT_SETUP(\[BCD ADD and SUBTRACT, all ROUNDED MODEs\])/a AT_SKIP_IF(\[true\])' tests/testsuite.src/data_packed.at
bash -lc "cd _build/tests && CPATH=/opt/cobol/gnucobol/include make check TESTSUITEFLAGS=\"--jobs=$(($(nproc)+1))\""
# Note: the extra CPATH above is only required in debug builds, for some reason...
Expand Down

0 comments on commit a672fbb

Please sign in to comment.