Skip to content

2024-02-16 18:23 UTC+0100 Przemyslaw Czerpak (druzus/at/poczta.onet.pl) #84

2024-02-16 18:23 UTC+0100 Przemyslaw Czerpak (druzus/at/poczta.onet.pl)

2024-02-16 18:23 UTC+0100 Przemyslaw Czerpak (druzus/at/poczta.onet.pl) #84

Workflow file for this run

name: macos-ci
on:
- push
- pull_request
jobs:
macos-ci:
runs-on: macos-latest
strategy:
fail-fast: false
matrix:
compiler:
- clang
- gcc
strictness:
- "normal"
- "strict"
steps:
- name: Configure environment
run: |
echo "Nothing to do for Macos"
- name: Install packages
run: |
brew install \
$(case ${{matrix.compiler }} in
(gcc) echo ${{matrix.compiler}} ;; esac) \
slang \
cairo \
libgd \
mysql \
postgresql \
qt5
# Dependencies for disabled contribs:
# freeimage \
- name: Checkout code
uses: actions/checkout@v3
with:
ref: ${{ github.event.client_payload.branch }}
- run: pwd
- run: ls
- name: Prepare ccache using action
uses: hendrikmuhs/ccache-action@v1.2.10
with:
key: macos-${{ matrix.cpu }}-${{ matrix.compiler }}-${{ matrix.strictness }}-ci
max-size: "32M"
- name: Configure build shell
run: |
set -ex
HB_USER_CFLAGS="-arch arm64 -arch x86_64"
HB_USER_LDFLAGS="-arch arm64 -arch x86_64"
case ${{matrix.strictness}} in
normal) ;;
strict) case ${{matrix.compiler}} in
(gcc) HB_USER_CFLAGS="$HB_USER_CFLAGS -Werror -Wno-error=deprecated-declarations -Wno-error=array-bounds" ;;
(*) HB_USER_CFLAGS="$HB_USER_CFLAGS -Werror -Wno-error=deprecated-declarations" ;;
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 HBMK_WITH_SQLITE3="local"
export HB_USER_CFLAGS="$HB_USER_CFLAGS"
export HB_USER_LDFLAGS="$HB_USER_LDFLAGS"
export HB_CCACHE=ccache
case ${{matrix.compiler}} in
gcc) latest_gcc="\$(cd /usr/local/bin && ls gcc-[1-9]* | sort -n | tail -1)"
export HB_CCSUFFIX="\${latest_gcc#gcc}" ;;
esac
EOENV
- name: Build Harbour
run: |
echo ::group::Build Harbour
set -ex
. ./.bashrc
make -j$(sysctl -n hw.ncpu) \
HB_BUILD_CONTRIBS=no \
HB_COMPILER=${{matrix.compiler}}
- name: Build contribs
run: |
echo ::group::Build contribs
set -ex
. ./.bashrc
make -j$(sysctl -n hw.ncpu) \
-C contrib \
HB_COMPILER=${{matrix.compiler}}
- name: Run tests
run: |
echo ::group::Run tests
set -ex
bin/darwin/${{matrix.compiler}}/hbtest