2023-11-11 16:00 UTC+0100 Phil Krylov (phil a t krylov.eu)
* .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.
This commit is contained in:
74
.github/workflows/linux-ci.yml
vendored
74
.github/workflows/linux-ci.yml
vendored
@@ -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
|
||||
@@ -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: |
|
||||
@@ -51,7 +37,6 @@ jobs:
|
||||
libcups2-dev \
|
||||
libcurl4-openssl-dev \
|
||||
firebird-dev \
|
||||
libfreeimage-dev \
|
||||
libgd-dev \
|
||||
libgs-dev \
|
||||
libmagic-dev \
|
||||
@@ -60,6 +45,10 @@ jobs:
|
||||
libpq-dev \
|
||||
qtbase5-dev
|
||||
|
||||
# Dependencies for disabled contribs:
|
||||
# libfreeimage-dev \
|
||||
|
||||
|
||||
- name: Checkout code
|
||||
uses: actions/checkout@v3
|
||||
with:
|
||||
@@ -71,15 +60,50 @@ jobs:
|
||||
- name: Prepare ccache using action
|
||||
uses: hendrikmuhs/ccache-action@v1.2.10
|
||||
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: |
|
||||
make \
|
||||
HB_COMPILER=${{matrix.compiler}} \
|
||||
-j$(nproc)
|
||||
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: |
|
||||
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
.github/workflows/macos-ci.yml
vendored
77
.github/workflows/macos-ci.yml
vendored
@@ -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
|
||||
@@ -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:
|
||||
@@ -62,15 +50,54 @@ jobs:
|
||||
- name: Prepare ccache using action
|
||||
uses: hendrikmuhs/ccache-action@v1.2.10
|
||||
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: |
|
||||
make \
|
||||
HB_COMPILER=${{matrix.compiler}} \
|
||||
-j$(nproc)
|
||||
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: |
|
||||
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
|
||||
|
||||
178
.github/workflows/vm1-ci.yml
vendored
Normal file
178
.github/workflows/vm1-ci.yml
vendored
Normal file
@@ -0,0 +1,178 @@
|
||||
name: vm1-ci
|
||||
|
||||
on:
|
||||
- push
|
||||
- pull_request
|
||||
|
||||
jobs:
|
||||
vm1-ci:
|
||||
runs-on: macos-latest
|
||||
|
||||
strategy:
|
||||
fail-fast: false
|
||||
matrix:
|
||||
os:
|
||||
- name: freebsd
|
||||
version: "13.2"
|
||||
- name: netbsd
|
||||
version: "9.3"
|
||||
- name: openbsd
|
||||
version: "7.4"
|
||||
- name: sunos
|
||||
compiler:
|
||||
- clang
|
||||
- gcc
|
||||
strictness:
|
||||
- "normal"
|
||||
- "strict"
|
||||
exclude:
|
||||
- os: {name: netbsd}
|
||||
compiler: clang
|
||||
- os: {name: openbsd}
|
||||
compiler: gcc
|
||||
- os: {name: sunos}
|
||||
|
||||
steps:
|
||||
|
||||
- name: Configure environment
|
||||
run: |
|
||||
echo "Nothing to do for ${{ matrix.os.name }}"
|
||||
|
||||
- name: Install packages
|
||||
run: |
|
||||
echo "The actual install takes place in the VM in the build step"
|
||||
|
||||
tee ~/work/install_freebsd_deps.sh <<EOF
|
||||
#!/bin/sh
|
||||
sudo pkg install -y \
|
||||
bison ccache gmake \
|
||||
$(case ${{matrix.compiler }} in
|
||||
(gcc) echo ${{matrix.compiler}} ;; esac) \
|
||||
libslang2 \
|
||||
cairo \
|
||||
libgd \
|
||||
mariadb-connector-c \
|
||||
postgresql16-client \
|
||||
qt5-buildtools qt5-gui
|
||||
EOF
|
||||
|
||||
# Dependencies for disabled contribs:
|
||||
# freeimage \
|
||||
|
||||
tee ~/work/install_netbsd_deps.sh <<EOF
|
||||
#!/bin/sh
|
||||
set -ex
|
||||
sudo pkgin -y install \
|
||||
bison ccache gmake
|
||||
EOF
|
||||
|
||||
tee ~/work/install_openbsd_deps.sh <<EOF
|
||||
#!/bin/sh
|
||||
set -ex
|
||||
sudo pkg_add \
|
||||
bison ccache gmake \
|
||||
$(case ${{matrix.compiler }} in
|
||||
(gcc) echo ${{matrix.compiler}} ;; esac)
|
||||
EOF
|
||||
|
||||
tee ~/work/install_sunos_deps.sh <<EOF
|
||||
set -ex
|
||||
pkg install SUNWgit SUNWgcc SUNWgmake
|
||||
EOF
|
||||
|
||||
chmod a+x ~/work/install_*_deps.sh
|
||||
|
||||
- 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: ${{ matrix.os.name }}-${{ matrix.compiler }}-${{ matrix.strictness }}-ci
|
||||
max-size: "32M"
|
||||
|
||||
- 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: Generate build script
|
||||
run: |
|
||||
tee ~/work/run_build.sh <<'EOF'
|
||||
set -ex
|
||||
echo "::group::Configure ccache in VM"
|
||||
ccache --set-config="cache_dir=$HOME/work/harbour/harbour/.ccache"
|
||||
ccache --set-config=max_size=32M
|
||||
ccache --set-config=compression=true
|
||||
ccache -p
|
||||
|
||||
echo ::group::Build Harbour
|
||||
set -ex
|
||||
. ./.bashrc
|
||||
gmake -j$(sysctl -n hw.ncpu) \
|
||||
HB_BUILD_CONTRIBS=no \
|
||||
HB_COMPILER=${{matrix.compiler}}
|
||||
|
||||
echo "::group::Build contribs"
|
||||
set -ex
|
||||
. ./.bashrc
|
||||
gmake -j$(sysctl -n hw.ncpu) \
|
||||
-C contrib \
|
||||
HB_COMPILER=${{matrix.compiler}}
|
||||
|
||||
echo "::group::Run tests"
|
||||
set -ex
|
||||
bin/*/${{matrix.compiler}}/hbtest
|
||||
EOF
|
||||
|
||||
- name: Build Harbour and contribs
|
||||
timeout-minutes: 30
|
||||
if: matrix.os.name != 'sunos'
|
||||
uses: cross-platform-actions/action@v0.21.1
|
||||
with:
|
||||
operating_system: ${{ matrix.os.name }}
|
||||
architecture: x86_64
|
||||
version: "${{ matrix.os.version }}"
|
||||
shell: bash
|
||||
memory: 2G
|
||||
cpu_count: 3
|
||||
sync_files: "true"
|
||||
run: |
|
||||
echo "::group::Install dependencies"
|
||||
set -ex
|
||||
~/work/install_${{ matrix.os.name }}_deps.sh
|
||||
. ~/work/run_build.sh
|
||||
|
||||
#- name: Build Harbour and contribs on SunOS
|
||||
# if: matrix.os.name == 'sunos'
|
||||
# uses: vmactions/solaris-vm@v0
|
||||
# with:
|
||||
# usesh: true
|
||||
# mem: 2048
|
||||
# prepare: |
|
||||
# echo "::group::Install dependencies"
|
||||
# set -ex
|
||||
# ~/work/install_${{ matrix.os.name }}_deps.sh
|
||||
# run: |
|
||||
# . ~/work/run_build.sh
|
||||
91
.github/workflows/windows-ci.yml
vendored
91
.github/workflows/windows-ci.yml
vendored
@@ -5,37 +5,32 @@ on:
|
||||
- pull_request
|
||||
|
||||
jobs:
|
||||
build-windows:
|
||||
windows-ci:
|
||||
runs-on: windows-latest
|
||||
|
||||
strategy:
|
||||
fail-fast: false
|
||||
matrix:
|
||||
os:
|
||||
- windows
|
||||
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
|
||||
{
|
||||
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"
|
||||
case ${{matrix.cpu}} in
|
||||
(x86) echo MINGWxx="MINGW32"
|
||||
echo "msys_cpu=i686" ;;
|
||||
@@ -43,9 +38,6 @@ jobs:
|
||||
echo "msys_cpu=${{matrix.cpu}}" ;;
|
||||
esac
|
||||
} >> $GITHUB_ENV
|
||||
tee -a $GITHUB_PATH <<EOPATH
|
||||
/mingw64/lib/ccache/bin
|
||||
EOPATH
|
||||
|
||||
- name: Install packages
|
||||
uses: msys2/setup-msys2@v2
|
||||
@@ -61,7 +53,6 @@ jobs:
|
||||
mingw-w64-${{ env.msys_cpu }}-cairo
|
||||
mingw-w64-${{ env.msys_cpu }}-curl
|
||||
mingw-w64-${{ env.msys_cpu }}-firebird2-git
|
||||
mingw-w64-${{ env.msys_cpu }}-freeimage
|
||||
mingw-w64-${{ env.msys_cpu }}-libgd
|
||||
mingw-w64-${{ env.msys_cpu }}-ghostscript
|
||||
mingw-w64-${{ env.msys_cpu }}-libmariadbclient
|
||||
@@ -69,6 +60,9 @@ jobs:
|
||||
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:
|
||||
@@ -78,20 +72,75 @@ jobs:
|
||||
- run: ls
|
||||
|
||||
- name: Prepare ccache using action
|
||||
if: matrix.compiler != 'bcc'
|
||||
uses: hendrikmuhs/ccache-action@v1.2.10
|
||||
with:
|
||||
key: ${{ matrix.os }}-${{ matrix.cpu }}-${{ matrix.compiler }}-${{ matrix.strictness }}-ci
|
||||
key: windows-${{ matrix.cpu }}-${{ matrix.compiler }}-${{ matrix.strictness }}-ci
|
||||
max-size: "32M"
|
||||
|
||||
- name: Compile Harbour
|
||||
- name: Configure build shell
|
||||
shell: msys2 {0}
|
||||
run: |
|
||||
mingw32-make.exe \
|
||||
HB_COMPILER=${{matrix.compiler}} \
|
||||
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}} \
|
||||
-j2
|
||||
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
|
||||
|
||||
Reference in New Issue
Block a user