Files
harbour-core/.github/workflows/linux-ci.yml
Phil Krylov 38c080a960 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.
2023-11-11 16:21:54 +01:00

110 lines
2.6 KiB
YAML

name: linux-ci
on:
- push
- pull_request
jobs:
ubuntu-ci:
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
compiler:
- clang
- gcc
strictness:
- "normal"
- "strict"
steps:
- name: Configure environment
shell: bash
run: |
echo "Nothing to do for Linux"
- name: Install packages
run: |
sudo apt-get install -qq \
libncurses-dev \
libslang2-dev \
libx11-dev \
libgpm-dev \
liballegro4.2-dev \
libcairo2-dev \
libcups2-dev \
libcurl4-openssl-dev \
firebird-dev \
libgd-dev \
libgs-dev \
libmagic-dev \
libmysqlclient-dev \
unixodbc-dev \
libpq-dev \
qtbase5-dev
# Dependencies for disabled contribs:
# libfreeimage-dev \
- 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: linux-${{ 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: 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: |
echo ::group::Run tests
set -ex
bin/linux/${{matrix.compiler}}/hbtest