name: Windows Standalone on: workflow_call: jobs: # # Pure Windows Build (on MSYS2) - create zip (and also pre-wheel zip) # Build: name: '🚧${{ matrix.icon }} ${{ matrix.sys }} (pure-build)' runs-on: windows-latest strategy: fail-fast: false matrix: include: - {icon: '🟪', pkg: 'mcode', sys: 'MINGW32', arch: 'i686' } # - {icon: '🟦', pkg: 'mcode', sys: 'MINGW64', arch: 'x86_64' } #! simulation with mcode is not yet supported on win64 - {icon: '🟨', pkg: 'mcode', sys: 'UCRT64', arch: 'ucrt-x86_64' } #! experimental; simulation with mcode is not yet supported on win64 env: MINGW_ARCH: ${{ matrix.sys }} defaults: run: shell: msys2 {0} steps: - name: '${{ matrix.icon }} Setup MSYS2' uses: msys2/setup-msys2@v2 with: msystem: ${{ matrix.sys }} update: true install: base-devel git mingw-w64-${{matrix.arch}}-gcc-ada mingw-w64-${{matrix.arch}}-zlib zip pacboy: > toolchain:p python-pip:p - name: '⚙ git config' run: git config --global core.autocrlf input shell: bash - name: '🧰 Checkout' uses: actions/checkout@v3 with: # The command 'git describe' (used for version) needs the history. fetch-depth: 0 - name: '🚧 Build package' run: | pip3 install pefile mkdir builddir cd builddir ../configure --prefix='/GHDL' LDFLAGS="-static -Wl,--stack=8388608" --enable-libghdl make mkdir -p 'GHDL' make install DESTDIR=. # No need to add dll dependencies for ghdl, as it is compiled # with -static make python-wheel zip pre-wheel-${{matrix.sys}}.zip -r dist-wheel setup-standalone.py zip ghdl-${{matrix.sys}}.zip -r GHDL - name: '📤 Upload artifact: pre-wheel' uses: actions/upload-artifact@v3 with: name: ${{ matrix.sys }}-pre-wheel path: | builddir/pre-wheel-${{matrix.sys}}.zip - name: '📤 Upload artifact: zip pure-win' uses: actions/upload-artifact@v3 with: name: ${{ matrix.sys }}-zip-win path: | builddir/ghdl-${{matrix.sys}}.zip Test: name: '🚦🐍🥡${{ matrix.icon }} ${{ matrix.sys }} (test sa)' runs-on: windows-latest needs: - Build strategy: fail-fast: false matrix: include: - {icon: '🟪', sys: 'MINGW32' } # - {icon: '🟦', sys: 'MINGW64' } #! simulation with mcode is not yet supported on win64 # - {icon: '🟨', sys: 'UCRT64' } #! experimental; simulation with mcode is not yet supported on win64 defaults: run: shell: pwsh steps: - name: '📥 Download artifact: package' uses: actions/download-artifact@v3 with: path: artifact name: ${{ matrix.sys }}-zip-win - name: '⚙ Extract package' run: | dir unzip artifact\ghdl-${{matrix.sys}}.zip dir - name: '🛠 Set envvars' run: | $GHDL_DIR = (pwd).Path + '\GHDL\bin' echo "GHDL=${GHDL_DIR}\ghdl.exe" | Out-File -FilePath $env:GITHUB_ENV -Encoding utf8 -Append echo "$GHDL_DIR" | Out-File -FilePath $env:GITHUB_PATH -Encoding utf8 -Append dir $GHDL_DIR - name: '🛠 Sanity check' run: | echo "GHDL is ${env:GHDL}" dir ${env:GHDL} & ${env:GHDL} version echo "sha: ${{github.sha}}" echo "head_ref: ${{github.head_ref}}" echo "ref_name: ${{github.ref_name}}" - name: '⚙ git config' run: | dir dir ${env:GHDL} git config --global core.autocrlf input - name: '🧰 Checkout' uses: actions/checkout@v3 with: path: checkout - name: '${{ matrix.icon }} Setup MSYS2' uses: msys2/setup-msys2@v2 with: msystem: ${{ matrix.sys }} update: true pacboy: > diffutils:p gcc:p - name: '🚦 Testsuite for ghdl' shell: msys2 {0} run: | set -x pwd ls -l echo "PATH: $PATH" echo "GHDL: $GHDL" cygghdl="$(cygpath -u $GHDL)" echo "cyg GHDL: $cygghdl" $cygghdl -v GHDL="$cygghdl" PATH="$PATH:$(dirname $cygghdl)" echo "PATH: $PATH" ghdl version cd checkout ./testsuite/testsuite.sh gna