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.
This commit is contained in:
2
.github/workflows/linux-ci.yml
vendored
2
.github/workflows/linux-ci.yml
vendored
@@ -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 \
|
||||
|
||||
34
.github/workflows/vm1-ci.yml
vendored
34
.github/workflows/vm1-ci.yml
vendored
@@ -18,7 +18,6 @@ jobs:
|
||||
version: "9.3"
|
||||
- name: openbsd
|
||||
version: "7.4"
|
||||
- name: sunos
|
||||
compiler:
|
||||
- clang
|
||||
- gcc
|
||||
@@ -30,7 +29,8 @@ jobs:
|
||||
compiler: clang
|
||||
- os: {name: openbsd}
|
||||
compiler: gcc
|
||||
- os: {name: sunos}
|
||||
# cross-platform-actions/actions@v0.21.1 works for FreeBSD but hangs often
|
||||
- os: {name: freebsd}
|
||||
|
||||
steps:
|
||||
|
||||
@@ -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
|
||||
@@ -93,12 +88,15 @@ jobs:
|
||||
- name: Prepare ccache using action
|
||||
uses: hendrikmuhs/ccache-action@v1.2.10
|
||||
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
|
||||
@@ -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
|
||||
@@ -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}}
|
||||
|
||||
@@ -150,7 +150,6 @@ jobs:
|
||||
|
||||
- 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 }}
|
||||
@@ -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
.github/workflows/vm2-ci.yml
vendored
Normal file
198
.github/workflows/vm2-ci.yml
vendored
Normal file
@@ -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/ccache-action@v1.2.10
|
||||
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
|
||||
Reference in New Issue
Block a user