Add GHA job w/ manual docker #106
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: ci-scripts build/test | |
on: [push, pull_request, workflow_dispatch] | |
env: | |
SETUP_PATH: .:.ci | |
SET: test01 | |
VV: 1 | |
BASE_RECURSIVE: NO | |
CMP: gcc | |
APT: re2c | |
CHOCO: re2c | |
BREW: re2c | |
jobs: | |
unit-test: | |
name: Unit tests on ${{ matrix.os }} | |
runs-on: ${{ matrix.os }} | |
strategy: | |
fail-fast: false | |
matrix: | |
os: [ubuntu-latest, ubuntu-22.04, ubuntu-20.04, windows-latest, windows-2022, windows-2019, macos-12] | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Show initial environment | |
run: python3 cue-test.py env | |
- name: Run unit tests | |
run: python3 cue-test.py | |
build-linux: | |
name: ${{ matrix.cmp }} / ${{ matrix.configuration }} / ${{ matrix.os }} | |
runs-on: ${{ matrix.os }} | |
env: | |
CMP: ${{ matrix.cmp }} | |
BCFG: ${{ matrix.configuration }} | |
strategy: | |
fail-fast: false | |
matrix: | |
os: [ubuntu-22.04, ubuntu-20.04] | |
cmp: [gcc, clang] | |
configuration: [default, static, debug, static-debug] | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Prepare and compile dependencies | |
run: python cue.py prepare | |
- name: Build main module (example app) | |
run: python cue.py build | |
- name: Run main module tests | |
run: python cue.py -T 15M test | |
- name: Collect and show test results | |
run: python cue.py test-results | |
build-macos: | |
name: ${{ matrix.cmp }} / ${{ matrix.configuration }} / ${{ matrix.os }} | |
runs-on: ${{ matrix.os }} | |
env: | |
CMP: ${{ matrix.cmp }} | |
BCFG: ${{ matrix.configuration }} | |
strategy: | |
fail-fast: false | |
matrix: | |
os: [macos-12] | |
cmp: [clang] | |
configuration: [default, debug] | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Prepare and compile dependencies | |
run: python cue.py prepare | |
- name: Build main module (example app) | |
run: python cue.py build | |
- name: Run main module tests | |
run: python cue.py -T 15M test | |
- name: Collect and show test results | |
run: python cue.py test-results | |
build-windows: | |
name: ${{ matrix.cmp }} / ${{ matrix.configuration }} / ${{ matrix.os }} | |
runs-on: ${{ matrix.os }} | |
env: | |
CMP: ${{ matrix.cmp }} | |
BCFG: ${{ matrix.configuration }} | |
strategy: | |
fail-fast: false | |
matrix: | |
os: [windows-2022, windows-2019] | |
cmp: [gcc, vs2022, vs2019] | |
configuration: [default, static, debug, static-debug] | |
exclude: | |
- os: windows-2022 | |
cmp: vs2019 | |
- os: windows-2019 | |
cmp: vs2022 | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Prepare and compile dependencies | |
run: python cue.py prepare | |
- name: Build main module (example app) | |
run: python cue.py build | |
- name: Run main module tests | |
run: python cue.py -T 15M test | |
- name: Collect and show test results | |
run: python cue.py test-results | |
build-cross: | |
name: cross ${{ matrix.cross }} / ${{ matrix.cmp }} / ${{ matrix.configuration }} | |
runs-on: ubuntu-latest | |
env: | |
CMP: gcc | |
BCFG: default | |
CI_CROSS_TARGETS: ${{ matrix.cross }} | |
TEST: ${{ matrix.test }} | |
APT: re2c | |
strategy: | |
fail-fast: false | |
matrix: | |
# configuration: [default, static, debug, static-debug] | |
configuration: [default] | |
cross: | |
- linux-aarch64 | |
- linux-arm@arm-linux-gnueabi | |
- linux-arm@arm-linux-gnueabihf | |
- linux-ppc | |
- linux-ppc64 | |
- win32-x86-mingw | |
- windows-x64-mingw | |
- [email protected] | |
- [email protected] | |
- RTEMS-pc686-qemu@5 | |
include: | |
- cross: [email protected] | |
test: NO | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Prepare and compile dependencies | |
run: python cue.py prepare | |
- name: Build main module (example app) | |
run: python cue.py build | |
- name: Run main module tests | |
run: python cue.py -T 15M test | |
- name: Collect and show test results | |
run: python cue.py test-results | |
build-docker: | |
name: Docker | |
runs-on: ubuntu-latest | |
env: | |
CMP: gcc | |
BCFG: default | |
CI_CROSS_TARGETS: ${{ matrix.cross }} | |
TEST: ${{ matrix.test }} | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Run... | |
run: | | |
env > env.list | |
cat <<EOF > runit.sh | |
#!/bin/sh | |
set -e -x | |
cd /io | |
id | |
sed -i s/mirror.centos.org/vault.centos.org/g /etc/yum.repos.d/*.repo | |
sed -i s/^#.*baseurl=http/baseurl=http/g /etc/yum.repos.d/*.repo | |
sed -i s/^mirrorlist=http/#mirrorlist=http/g /etc/yum.repos.d/*.repo | |
yum -y install epel-release | |
yum -y install \ | |
curl make gcc curl-devel expat-devel gettext-devel openssl-devel zlib-devel perl-ExtUtils-MakeMaker \ | |
python3 gdb make perl gcc-c++ glibc-devel readline-devel ncurses-devel perl-devel libevent-devel \ | |
sudo re2c | |
[ -e /usr/bin/python ] || ln -sf /usr/bin/python3 /usr/bin/python | |
# fake out cue.py | |
ln -s /bin/true /usr/bin/apt-get | |
# quiet warnings spam from perl | |
export LANG=C | |
python --version | |
python cue.py prepare | |
python cue.py build | |
python cue.py -T 15M test | |
python cue.py test-results | |
EOF | |
chmod +x runit.sh | |
docker run --rm --quiet \ | |
--pull=always \ | |
--env-file env.list \ | |
-v `pwd`:/io \ | |
centos:7 \ | |
/io/runit.sh |