Skip to content

Commit

Permalink
2023-11-11 16:00 UTC+0100 Phil Krylov (phil a t krylov.eu)
Browse files Browse the repository at this point in the history
  * .github/workflows/linux-ci.yml
  * .github/workflows/macos-ci.yml
  + .github/workflows/vm1-ci.yml
  * .github/workflows/windows-ci.yml
    + Added bcc (32-bit) Windows CI build.
    + Added FreeBSD, NetBSD, and OpenBSD CI builds.
    * Cosmetic changes to keep different workflows easily diffable.
  • Loading branch information
tuffnatty committed Nov 11, 2023
1 parent ae266a6 commit 38c080a
Show file tree
Hide file tree
Showing 5 changed files with 358 additions and 71 deletions.
74 changes: 49 additions & 25 deletions .github/workflows/linux-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,14 +5,12 @@ on:
- pull_request

jobs:
build-ubuntu:
ubuntu-ci:
runs-on: ubuntu-latest

strategy:
fail-fast: false
matrix:
os:
- ubuntu
compiler:
- clang
- gcc
Expand All @@ -21,23 +19,11 @@ jobs:
- "strict"

steps:

- name: Configure environment
shell: bash
run: |
{
HB_USER_CFLAGS=""
HB_USER_LDFLAGS=""
case ${{matrix.strictness}} in
normal) ;;
strict) HB_USER_CFLAGS="$HB_USER_CFLAGS -Werror" ;;
esac
echo HB_BUILD_VERBOSE="yes"
echo HB_USER_CFLAGS="$HB_USER_CFLAGS"
echo HB_USER_LDFLAGS="$HB_USER_LDFLAGS"
} >> $GITHUB_ENV
tee -a $GITHUB_PATH <<EOPATH
/usr/lib/ccache
/usr/local/opt/ccache/libexec
EOPATH
echo "Nothing to do for Linux"
- name: Install packages
run: |
Expand All @@ -51,7 +37,6 @@ jobs:
libcups2-dev \
libcurl4-openssl-dev \
firebird-dev \
libfreeimage-dev \
libgd-dev \
libgs-dev \
libmagic-dev \
Expand All @@ -60,6 +45,10 @@ jobs:
libpq-dev \
qtbase5-dev
# Dependencies for disabled contribs:
# libfreeimage-dev \
- name: Checkout code
uses: actions/checkout@v3
with:
Expand All @@ -71,15 +60,50 @@ jobs:
- name: Prepare ccache using action
uses: hendrikmuhs/[email protected]
with:
key: ${{ matrix.os }}-${{ matrix.compiler }}-${{ matrix.strictness }}-ci
key: linux-${{ matrix.compiler }}-${{ matrix.strictness }}-ci
max-size: "32M"

- name: Compile Harbour
- name: Configure build shell
run: |
set -ex
HB_USER_CFLAGS=""
HB_USER_LDFLAGS=""
case ${{matrix.strictness}} in
normal) ;;
strict) case ${{matrix.compiler}} in
(*) 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=ccache
EOENV
- name: Build Harbour
run: |
echo ::group::Build Harbour
set -ex
. ./.bashrc
make -j$(nproc) \
HB_BUILD_CONTRIBS=no \
HB_COMPILER=${{matrix.compiler}}
- name: Build contribs
run: |
make \
HB_COMPILER=${{matrix.compiler}} \
-j$(nproc)
echo ::group::Build contribs
set -ex
. ./.bashrc
make -j$(nproc) \
-C contrib \
HB_COMPILER=${{matrix.compiler}}
- name: Run tests
run: |
bin/linux/${{matrix.compiler}}/hbtest
echo ::group::Run tests
set -ex
bin/linux/${{matrix.compiler}}/hbtest
77 changes: 52 additions & 25 deletions .github/workflows/macos-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,14 +5,12 @@ on:
- pull_request

jobs:
build-macos:
macos-ci:
runs-on: macos-latest

strategy:
fail-fast: false
matrix:
os:
- macos
compiler:
- clang
- gcc
Expand All @@ -21,36 +19,26 @@ jobs:
- "strict"

steps:

- name: Configure environment
run: |
{
HB_USER_CFLAGS="-arch arm64 -arch x86_64"
HB_USER_LDFLAGS="-arch arm64 -arch x86_64"
case ${{matrix.strictness}} in
normal) ;;
strict) HB_USER_CFLAGS="$HB_USER_CFLAGS -Werror" ;;
esac
echo HB_BUILD_VERBOSE="yes"
echo HB_USER_CFLAGS="$HB_USER_CFLAGS"
echo HB_USER_LDFLAGS="$HB_USER_LDFLAGS"
echo HB_BUILD_CONTRIBS="no hbfimage" # incompatible with freeimage 3.18+
} >> $GITHUB_ENV
tee -a $GITHUB_PATH <<EOPATH
/usr/lib/ccache
/usr/local/opt/ccache/libexec
EOPATH
echo "Nothing to do for Macos"
- name: Install packages
run: |
brew install \
$(case ${{matrix.compiler }} in
(gcc) echo ${{matrix.compiler}} ;; esac) \
slang \
cairo \
freeimage \
libgd \
mysql \
postgresql \
qt5
# Dependencies for disabled contribs:
# freeimage \
- name: Checkout code
uses: actions/checkout@v3
with:
Expand All @@ -62,15 +50,54 @@ jobs:
- name: Prepare ccache using action
uses: hendrikmuhs/[email protected]
with:
key: ${{ matrix.os }}-${{ matrix.cpu }}-${{ matrix.compiler }}-${{ matrix.strictness }}-ci
key: macos-${{ matrix.cpu }}-${{ matrix.compiler }}-${{ matrix.strictness }}-ci
max-size: "32M"

- name: Compile Harbour
- 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
(*) 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=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: |
make \
HB_COMPILER=${{matrix.compiler}} \
-j$(nproc)
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
Loading

0 comments on commit 38c080a

Please sign in to comment.