name: windows-ci on: - push - pull_request jobs: windows-ci: runs-on: windows-latest strategy: fail-fast: false matrix: compiler: - bcc - mingw64 - clang cpu: - x86 - x86_64 exclude: - compiler: bcc cpu: x86_64 - compiler: clang cpu: x86 strictness: - "normal" - "strict" steps: - name: Configure environment shell: bash run: | set -ex { case ${{matrix.cpu}} in (x86) echo MINGWxx="MINGW32" echo "msys_cpu=i686" ;; (x86_64) echo MINGWxx="MINGW64" echo "msys_cpu=${{matrix.cpu}}" ;; esac case ${{matrix.compiler}} in (clang) echo MINGWxx="CLANG64" ;; esac } >> $GITHUB_ENV - name: Install packages uses: msys2/setup-msys2@v2 with: msystem: ${{ env.MINGWxx }} location: d:/ update: true install: > mingw-w64-${{ env.msys_cpu }}-ccache mingw-w64-${{ env.msys_cpu }}-gcc mingw-w64-${{ env.msys_cpu }}-make mingw-w64-${{ env.msys_cpu }}-allegro mingw-w64-${{ env.msys_cpu }}-bzip2 mingw-w64-${{ env.msys_cpu }}-cairo mingw-w64-${{ env.msys_cpu }}-curl mingw-w64-${{ env.msys_cpu }}-ghostscript mingw-w64-${{ env.msys_cpu }}-openssl openssl-devel - name: 'Add packages available on 64-bit hosts only' if: matrix.cpu != 'x86' shell: msys2 {0} run: | pacman -S --noconfirm mingw-w64-${{ env.msys_cpu }}-postgresql pacman -S --noconfirm mingw-w64-${{ env.msys_cpu }}-qt5-base pacman -S --noconfirm mingw-w64-${{ env.msys_cpu }}-libgd pacman -S --noconfirm mingw-w64-${{ env.msys_cpu }}-libmariadbclient pacman -S --noconfirm mingw-w64-${{ env.msys_cpu }}-firebird pacman -S --noconfirm mingw-w64-${{ env.msys_cpu }}-freeimage - name: Checkout code uses: actions/checkout@v3 with: ref: ${{ github.event.client_payload.branch }} - run: pwd shell: msys2 {0} - run: ls shell: msys2 {0} - name: Prepare ccache using action if: matrix.compiler != 'bcc' uses: hendrikmuhs/ccache-action@v1.2.10 with: key: windows-${{ matrix.cpu }}-${{ matrix.compiler }}-${{ matrix.strictness }}-ci max-size: "32M" - name: Configure build shell shell: msys2 {0} run: | set -ex HB_USER_CFLAGS="" HB_USER_LDFLAGS="" case ${{matrix.compiler}} in (clang) pacman -S --noconfirm mingw-w64-${{ env.msys_cpu }}-clang PATH="$PATH:/mingw64/bin/" tee ./.bashrc <