Skip to content

Commit

Permalink
2023-12-07 20: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
    ! Linux CI build fix (outdated packages).
  * .github/workflows/vm1-ci.yml
  + .github/workflows/vm2-ci.yml
    + Added an OmniOS CI build.
    ! Switched FreeBSD CI build to vmactions/freebsd@v1 action as it's
      more stable.
  • Loading branch information
tuffnatty committed Dec 7, 2023
1 parent 1d4748a commit 7e7ca1d
Show file tree
Hide file tree
Showing 4 changed files with 219 additions and 24 deletions.
2 changes: 2 additions & 0 deletions .github/workflows/linux-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,8 @@ jobs:
- name: Install packages
run: |
export DEBIAN_FRONTEND=noninteractive
sudo apt-get update
sudo apt-get install -qq \
valgrind \
libncurses-dev \
Expand Down
34 changes: 10 additions & 24 deletions .github/workflows/vm1-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@ jobs:
version: "9.3"
- name: openbsd
version: "7.4"
- name: sunos
compiler:
- clang
- gcc
Expand All @@ -30,7 +29,8 @@ jobs:
compiler: clang
- os: {name: openbsd}
compiler: gcc
- os: {name: sunos}
# cross-platform-actions/[email protected] works for FreeBSD but hangs often
- os: {name: freebsd}

steps:

Expand Down Expand Up @@ -75,11 +75,6 @@ jobs:
(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
Expand All @@ -93,12 +88,15 @@ jobs:
- name: Prepare ccache using action
uses: hendrikmuhs/[email protected]
with:
key: ${{ matrix.os.name }}-${{ matrix.compiler }}-${{ matrix.strictness }}-ci
key: ${{ matrix.os.name }}-${{ matrix.os.version }}-${{ matrix.compiler }}-${{ matrix.strictness }}-ci
max-size: "32M"

- name: Configure build shell
run: |
set -ex
case ${{matrix.os.name }} in
*bsd) _cpus="sysctl -n hw.ncpu" ;;
esac
HB_USER_CFLAGS=""
HB_USER_LDFLAGS=""
case ${{matrix.strictness}} in
Expand All @@ -117,6 +115,8 @@ jobs:
export HB_USER_CFLAGS="$HB_USER_CFLAGS"
export HB_USER_LDFLAGS="$HB_USER_LDFLAGS"
export HB_CCACHE=ccache
export N_CPUS="\$($_cpus)"
EOENV
- name: Generate build script
Expand All @@ -132,14 +132,14 @@ jobs:
echo ::group::Build Harbour
set -ex
. ./.bashrc
gmake -j$(/sbin/sysctl -n hw.ncpu) \
gmake -j$N_CPUS \
HB_BUILD_CONTRIBS=no \
HB_COMPILER=${{matrix.compiler}}
echo "::group::Build contribs"
set -ex
. ./.bashrc
gmake -j$(/sbin/sysctl -n hw.ncpu) \
gmake -j$N_CPUS \
-C contrib \
HB_COMPILER=${{matrix.compiler}}
Expand All @@ -150,7 +150,6 @@ jobs:
- name: Build Harbour and contribs
timeout-minutes: 30
if: matrix.os.name != 'sunos'
uses: cross-platform-actions/[email protected]
with:
operating_system: ${{ matrix.os.name }}
Expand All @@ -165,16 +164,3 @@ jobs:
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
198 changes: 198 additions & 0 deletions .github/workflows/vm2-ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,198 @@
name: vm2-ci

on:
- push
- pull_request

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

strategy:
fail-fast: false
matrix:
os:
- name: freebsd
version: "14.0"
- name: omnios
version: "r151046"
- name: solaris
version: "11.4"
compiler:
- clang
- gcc
strictness:
- "normal"
- "strict"
exclude:
- os: {name: omnios}
compiler: clang
# vmactions/solaris-vm works but is very slow to install gcc. Disable it for now
- os: {name: solaris}
- os: {name: solaris}
compiler: clang

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
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_omnios_deps.sh <<EOF
#!/usr/xpg4/bin/sh
set -ex
pkg install \
build-essential \
ccache
pkg list
EOF
tee ~/work/install_solaris_deps.sh <<EOF
#!/usr/xpg4/bin/sh
set -ex
pkgadd -n -d http://get.opencsw.org/now CSWpkgutil || true # already installed by action
/opt/csw/bin/pkgutil -U
/opt/csw/bin/pkgutil -y -i \
ccache \
gcc5core \
gmake \
libcurl_dev \
libssl_dev
/opt/csw/bin/pkgutil -l
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/[email protected]
with:
key: ${{ matrix.os.name }}-${{ matrix.os.version }}-${{ matrix.compiler }}-${{ matrix.strictness }}-ci
max-size: "32M"

- name: Configure build shell
run: |
set -ex
case ${{matrix.os.name }} in
*bsd) _cpus="sysctl -n hw.ncpu" ;;
omnios|solaris) _cpus="psrinfo -p" _add_path="/usr/sfw/bin" ;;
esac
HB_USER_CFLAGS=""
HB_USER_LDFLAGS=""
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" ;;
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
export PATH="$_add_path:\$PATH"
export N_CPUS="\$($_cpus)"
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=$(pwd)/.ccache"
ccache --set-config=max_size=32M
ccache --set-config=compression=true
ccache -p
echo ::group::Build Harbour
set -ex
. ./.bashrc
gmake -j$N_CPUS \
HB_BUILD_CONTRIBS=no \
HB_COMPILER=${{matrix.compiler}}
echo "::group::Build contribs"
set -ex
. ./.bashrc
gmake -j$N_CPUS \
-C contrib \
HB_COMPILER=${{matrix.compiler}}
echo "::group::Run tests"
set -ex
bin/*/${{matrix.compiler}}/hbtest
EOF
- name: Build Harbour and contribs (FreeBSD VM)
if: matrix.os.name == 'freebsd'
uses: vmactions/freebsd-vm@v1
with:
usesh: true
mem: 2048
release: "${{ matrix.os.version }}"
prepare: |
echo "::group::Install dependencies"
set -ex
~/work/install_${{ matrix.os.name }}_deps.sh
run: |
. ~/work/run_build.sh
- name: Build Harbour and contribs (OmniOS VM)
if: matrix.os.name == 'omnios'
uses: vmactions/omnios-vm@v1
with:
usesh: true
mem: 2048
prepare: |
echo "::group::Install dependencies"
set -ex
~/work/install_${{ matrix.os.name }}_deps.sh
run: |
. ~/work/run_build.sh
- name: Build Harbour and contribs (Solaris VM)
if: matrix.os.name == 'solaris'
uses: vmactions/solaris-vm@v1
with:
usesh: true
mem: 4096
prepare: |
echo "::group::Install dependencies"
set -ex
~/work/install_${{ matrix.os.name }}_deps.sh
run: |
. ~/work/run_build.sh
9 changes: 9 additions & 0 deletions ChangeLog.txt
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,15 @@
Entries may not always be in chronological/commit order.
See license at the end of file. */

2023-12-07 20:00 UTC+0100 Phil Krylov (phil a t krylov.eu)
* .github/workflows/linux-ci.yml
! Linux CI build fix (outdated packages).
* .github/workflows/vm1-ci.yml
+ .github/workflows/vm2-ci.yml
+ Added an OmniOS CI build.
! Switched FreeBSD CI build to vmactions/freebsd@v1 action as it's
more stable.

2023-12-01 11:00 UTC+0100 Phil Krylov (phil a t krylov.eu)
* src/rtl/fserr.c
* Mapped ERROR_INVALID_NAME on Windows to DOS error 2.
Expand Down

0 comments on commit 7e7ca1d

Please sign in to comment.