feat (parser): add parsing support for all class attributes with "unimplemented" warning #1215
Workflow file for this run
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: Windows MSVC Workflow | |
| on: | |
| pull_request: | |
| branches: [ gitside-gnucobol-3.x ] | |
| push: | |
| # manual run in actions tab - for all branches | |
| workflow_dispatch: | |
| env: | |
| GC_VERSION: GnuCOBOL 3.3-dev | |
| FLEXBISON: https://github.com/lexxmark/winflexbison/releases/download/v2.5.25/win_flex_bison-2.5.25.zip | |
| MSBUILD: C:\Program Files\Microsoft Visual Studio\2022\Enterprise\MSBuild\Current\Bin\MSBuild.exe | |
| VCVARS32: C:\Program Files\Microsoft Visual Studio\2022\Enterprise\VC\Auxiliary\Build\vcvars32.bat | |
| VCVARS64: C:\Program Files\Microsoft Visual Studio\2022\Enterprise\VC\Auxiliary\Build\vcvars64.bat | |
| VCPKG_ROOT: C:\vcpkg | |
| # libxml2 package break in 2.14.5, see https://github.com/microsoft/vcpkg/issues/47155 | |
| VCPKGS32: mpir:x86-windows pdcurses:x86-windows berkeleydb:x86-windows libxml2:x86-windows cjson:x86-windows | |
| VCPKGS64: mpir:x64-windows pdcurses:x64-windows berkeleydb:x64-windows libxml2:x64-windows cjson:x64-windows | |
| MSYS2_ROOT: C:\msys64 | |
| MSYSTEM: UCRT64 | |
| MSYSPKGS: autoconf | |
| defaults: | |
| run: | |
| shell: cmd | |
| jobs: | |
| build: | |
| runs-on: windows-latest | |
| timeout-minutes: 25 | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| arch: | |
| - x86 | |
| - x64 | |
| target: | |
| - Debug | |
| - Release | |
| steps: | |
| - name: Set git user | |
| run: | | |
| git config --global user.name github-actions | |
| git config --global user.email github-actions-bot@users.noreply.github.com | |
| - name: Checkout code | |
| uses: actions/checkout@v4 | |
| - name: Setup build environment | |
| shell: pwsh | |
| run: | | |
| If ("${{ matrix.arch }}" -eq "x86") { | |
| echo VCVARS=$env:VCVARS32 >> $env:GITHUB_ENV | |
| echo VCPKGS=$env:VCPKGS32 >> $env:GITHUB_ENV | |
| echo ARCHDIR=Win32 >> $env:GITHUB_ENV | |
| } Else { | |
| echo VCVARS=$env:VCVARS64 >> $env:GITHUB_ENV | |
| echo VCPKGS=$env:VCPKGS64 >> $env:GITHUB_ENV | |
| echo ARCHDIR=x64 >> $env:GITHUB_ENV | |
| } | |
| - name: Restore VCPKG cache | |
| id: restore-vcpkg | |
| uses: actions/cache/restore@v4 | |
| with: | |
| key: cache-vcpkg-${{ matrix.arch }}-${{ matrix.target }} | |
| path: | | |
| ${{ env.VCPKG_ROOT }}/installed | |
| ${{ env.VCPKG_ROOT }}/packages | |
| - name: Bootstrap VCPKG | |
| run: | | |
| cd /d "%VCPKG_ROOT%" | |
| git pull | |
| cmd /C .\bootstrap-vcpkg.bat -disableMetrics | |
| vcpkg update | |
| - name: Integrate VCPKG | |
| run: vcpkg integrate install | |
| - name: Install VCPKG packages | |
| # note: always done to update the cache as-needed | |
| run: vcpkg install %VCPKGS% | |
| - name: Save VCPKG cache | |
| uses: actions/cache/save@v4 | |
| with: | |
| key: cache-vcpkg-${{ matrix.arch }}-${{ matrix.target }} | |
| path: | | |
| ${{ env.VCPKG_ROOT }}/installed | |
| ${{ env.VCPKG_ROOT }}/packages | |
| - name: Restore WinFlexBison cache | |
| uses: actions/cache/restore@v4 | |
| id: restore-flexbison | |
| with: | |
| key: cache-flexbison-${{ matrix.arch }}-${{ matrix.target }} | |
| path: flexbison | |
| - name: Install WinFlexBison | |
| if: steps.restore-flexbison.outputs.cache-hit != 'true' | |
| shell: pwsh | |
| run: | | |
| Invoke-WebRequest -Uri $env:FLEXBISON -OutFile flexbison.zip | |
| Expand-Archive flexbison.zip -DestinationPath flexbison | |
| - name: Save WinFlexBison cache | |
| if: steps.restore-flexbison.outputs.cache-hit != 'true' | |
| uses: actions/cache/save@v4 | |
| with: | |
| key: cache-flexbison-${{ matrix.arch }}-${{ matrix.target }} | |
| path: flexbison | |
| - name: Configure GnuCOBOL | |
| shell: pwsh | |
| run: | | |
| cd build_windows | |
| (('#define COB_MAIN_DIR "' + $env:GITHUB_WORKSPACE + '"') -replace '\\', '\\') + "`r`n" + ` | |
| ((Get-Content -Path 'config.h.in' | ForEach-Object { $_ ` | |
| -replace '(#define\s+CONFIGURED_ISAM)\s.+$', '$1 BDB' ` | |
| -replace '(#define\s+CONFIGURED_CURSES)\s.+$', '$1 PDCURSES' ` | |
| -replace '(#define\s+CONFIGURED_XML)\s.+$', '$1 XML2' ` | |
| -replace '(#define\s+CONFIGURED_JSON)\s.+$', '$1 CJSON_CJSON' ` | |
| -replace '"\(" PACKAGE_NAME "\) "', '"(GnuCOBOL-CI ${{ matrix.target }}) "' ` | |
| }) -join "`r`n") | Set-Content -Path 'config.h' | |
| & .\maketarstamp.ps1 > tarstamp.h | |
| - name: Disable iconv for debug builds | |
| if: ${{ matrix.target == 'Debug' }} | |
| shell: pwsh | |
| run: | | |
| cd build_windows | |
| ((Get-Content -Path 'config.h' | ForEach-Object { $_ ` | |
| -replace '(#define\s+HAVE_ICONV)\s.+$', '/* #undef HAVE_ICONV */' ` | |
| }) -join "`r`n" ) | Set-Content -Path 'config.h' | |
| - name: Generate parser | |
| run: | | |
| set PATH=%GITHUB_WORKSPACE%\flexbison;%PATH% | |
| cmd /C .\build_windows\makebisonflex.cmd <NUL | |
| - name: Build GnuCOBOL | |
| run: | | |
| cd build_windows | |
| set CL=/I "%VCPKG_ROOT%\installed\${{ matrix.arch }}-windows\include\libxml2" | |
| "%MSBUILD%" .\vs2019\GnuCOBOL.sln /m /p:Platform=${{ matrix.arch }} /p:Configuration=${{ matrix.target }} | |
| - name: Install MSYS2 packages | |
| shell: C:\shells\msys2bash.cmd {0} | |
| run: pacman --needed --noconfirm -S $MSYSPKGS | |
| - 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=\'tests\' >> 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], [bug-gnucobol@gnu.org]\) >> package.m4 | |
| sed 's/x64\/Debug/${{ env.ARCHDIR }}\/${{ matrix.target }}/g' atlocal_win > atlocal | |
| echo "CI environmen MSVC: ${{ env.ARCHDIR }}\/${{ matrix.target }} configured." > ../config.log | |
| cat ../build_windows/config.h >> ../config.log | |
| autom4te --lang=autotest -I ./testsuite.src ./testsuite.at -o ./testsuite | |
| # Fail tests that behave differently under MSVC Debug | |
| # - Internal storage: different memory layout leading to different error | |
| - name: Adjust testsuite | |
| shell: C:\shells\msys2bash.cmd {0} | |
| run: | | |
| # sed -i '/AT_SETUP(\[runtime check: write to internal storage (1)\])/a AT_SKIP_IF(\[true\])' tests/testsuite.src/run_misc.at | |
| sed -i '/run_misc/{N;/write to internal storage (1)/{N;N;N;N;s/traceon/traceon; echo "workflow:1">"$at_check_line_file"; at_fn_check_skip 77/;}}' tests/testsuite | |
| # Fail tests that behave differently under MSVC Debug | |
| # - System routine CBL_GC_HOSTED: fails because libcob is linked with the debug version | |
| # of the C runtime while the generated module is linked with the release version | |
| # CHECKME: cobc should use cl.exe /MTd and therefore all should use the debug runtime | |
| # - Internal storage: runtime checks abort before signal handler | |
| # - COB_SIGNAL_REGIME 0/1: runtime checks abort before signal handler | |
| - name: Adjust testsuite for Debug target | |
| if: ${{ matrix.target == 'Debug' }} | |
| shell: C:\shells\msys2bash.cmd {0} | |
| run: | | |
| sed -i '/run_extensions/{N;/System routine CBL_GC_HOSTED/{N;s/at_xfail=no/at_xfail=yes/;}}' tests/testsuite | |
| sed -i '/run_misc/{N;/write to internal storage (1)/{N;N;N;N;s/traceon/traceon; echo "workflow:1">"$at_check_line_file"; at_fn_check_skip 77/;}}' tests/testsuite | |
| sed -i '/run_misc/{N;/COB_SIGNAL_REGIME 0/{N;s/at_xfail=no/at_xfail=yes/;}}' tests/testsuite | |
| - name: Run testsuite | |
| run: | | |
| rem Needed so mpir.h can be found | |
| set CL=/I "%VCPKG_ROOT%\installed\${{ matrix.arch }}-windows\include" | |
| call "%VCVARS%" | |
| cd tests | |
| set MSYS2_PATH_TYPE=inherit | |
| C:\shells\msys2bash.cmd -c "./testsuite --jobs=4 || ./testsuite --recheck --verbose" | |
| - name: Upload testsuite.log | |
| if: ${{ !cancelled() }} | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: testsuite-${{ matrix.arch }}-${{ matrix.target }}.log | |
| path: tests/testsuite.log | |
| - name: Package GnuCOBOL and dependencies | |
| run: | | |
| echo Export VCPKG dependencies | |
| vcpkg export %VCPKGS% --raw --output=export | |
| set VCPKG_EXPORT_DIR=%VCPKG_ROOT%\export | |
| echo Wrap up VCPKG dependencies for separate download | |
| 7z a -r -mx=9 dependencies-${{ matrix.arch }}-${{ matrix.target }}.7z "%VCPKG_EXPORT_DIR" | |
| echo Wrap up GnuCOBOL binary package | |
| cmd /C .\build_windows\makedist.cmd ${{ matrix.target }} <NUL | |
| - name: Upload dependencies | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: dependencies-${{ matrix.arch }}-${{ matrix.target }}.7z | |
| path: dependencies-${{ matrix.arch }}-${{ matrix.target }}.7z | |
| - name: Upload distribution | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: GnuCOBOL-${{ matrix.arch }}-${{ matrix.target }}.7z | |
| path: build_windows/GnuCOBOL_*.7z |