Skip to content

2023-11-11 17:07 UTC+0100 Phil Krylov (phil a t krylov.eu) #12

2023-11-11 17:07 UTC+0100 Phil Krylov (phil a t krylov.eu)

2023-11-11 17:07 UTC+0100 Phil Krylov (phil a t krylov.eu) #12

Workflow file for this run

name: windows-ci
on:
- push
- pull_request
jobs:
windows-ci:
runs-on: windows-latest
strategy:
fail-fast: false
matrix:
compiler:
- bcc
- mingw64
cpu:
- x86
- x86_64
exclude:
- compiler: bcc
cpu: x86_64
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
} >> $GITHUB_ENV
- name: Install packages
uses: msys2/setup-msys2@v2
with:
msystem: ${{ env.MINGWxx }}
location: d:/
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 }}-firebird2-git
mingw-w64-${{ env.msys_cpu }}-libgd
mingw-w64-${{ env.msys_cpu }}-ghostscript
mingw-w64-${{ env.msys_cpu }}-libmariadbclient
mingw-w64-${{ env.msys_cpu }}-openssl
mingw-w64-${{ env.msys_cpu }}-postgresql
mingw-w64-${{ env.msys_cpu }}-qt5-base
# Dependencies for disabled contribs:
# mingw-w64-${{ env.msys_cpu }}-freeimage
- name: Checkout code
uses: actions/checkout@v3
with:
ref: ${{ github.event.client_payload.branch }}
- run: pwd
- run: ls
- 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.strictness}} in
normal) ;;
strict) case ${{matrix.compiler}} in
(bcc) HB_USER_CFLAGS="$HB_USER_CFLAGS -w!" ;;
(*) HB_USER_CFLAGS="$HB_USER_CFLAGS -Werror" ;;
esac ;;
esac
tee ./.bashrc <<EOENV
# These contribs do not build on any platform
export HB_BUILD_CONTRIBS="no hbfimage" # incompatible with freeimage 3.18+
export HB_BUILD_VERBOSE="yes"
export HB_USER_CFLAGS="$HB_USER_CFLAGS"
export HB_USER_LDFLAGS="$HB_USER_LDFLAGS"
export HB_CCACHE=$(which ccache.exe)
export mingwxx="$(echo "$MINGWxx" | tr A-Z a-z)"
EOENV
case ${{matrix.compiler}} in
bcc)
curl -LO "http://altd.embarcadero.com/download/bcppbuilder/freecommandLinetools.exe"
./freecommandLinetools.exe -s -verbose
find /c/Borland -type d || exit 1
tee -a ./.bashrc <<EOMSYSENV
export PATH="/c/Borland/BCC55/Bin:\$PATH"
export HB_WITH_CURL="/d/msys64/$mingwxx/include"
export HB_CCACHE=""
EOMSYSENV
;;
esac
- name: Build Harbour
shell: msys2 {0}
run: |
echo ::group::Build Harbour
set -ex
source ./.bashrc
mingw32-make.exe -j2 \
HB_CPU=${{matrix.cpu}} \
HB_BUILD_CONTRIBS=no \
HB_COMPILER=${{matrix.compiler}}
- name: Build contribs
shell: msys2 {0}
run: |
echo ::group::Build contribs
set -ex
source ./.bashrc
mingw32-make.exe -j2 \
-C contrib \
HB_CPU=${{matrix.cpu}} \
HB_COMPILER=${{matrix.compiler}}
- name: Run tests
shell: msys2 {0}
run: |
echo ::group::Run tests
set -ex
bin/win/${{matrix.compiler}}/hbtest.exe