Skip to content

wip

wip #32

Workflow file for this run

# test GAP cross compilation
name: cross
# Trigger the workflow on push or pull request
on:
pull_request:
push:
concurrency:
# group by workflow and ref; the last slightly strange component ensures that for pull
# requests, we limit to 1 concurrent job, but for the master branch we don't
group: ${{ github.workflow }}-${{ github.ref }}-${{ github.ref != 'refs/heads/master' || github.run_number }}
# Cancel intermediate builds, but only if it is a pull request build.
cancel-in-progress: ${{ startsWith(github.ref, 'refs/pull/') }}
env:
# default config flags: enable debug asserts
CONFIGFLAGS: "--enable-debug"
jobs:
cross_compile:
# The host should always be linux
runs-on: ubuntu-22.04
name: Cross compiler for s390x
steps:
- name: Install Cross-Compile Support
uses: fingolfin/gha-ubuntu-cross@patch-1 # FIXME: see https://github.com/cyberjunk/gha-ubuntu-cross/pull/8
with:
arch: s390x
- name: Install general build dependencies
run: sudo apt-get install -q -y git autoconf
- name: Install cross compile dependencies
run: sudo apt-get install -q -y git libgmp-dev:s390x libreadline-dev:s390x zlib1g-dev:s390x
- uses: actions/checkout@v4
- run: ./autogen.sh
- name: Native compile
run: |
# When building a git snapshot, configure & compile a native version of GAP to
# generate ffdata.{c,h}, c_oper1.c and c_type1.c -- in a GAP release tarball
# this is not necessary.
mkdir native-build
cd native-build
../configure --without-readline
make -j2
cp build/c_*.c build/ffdata.* ../src/
cd ..
- name: Configure
run: ./configure --host="s390x-linux-gnu"
- name: Cross compile
run: make -j2 V=1 all build-testlibgap build-testkernel
- name: Fixup sysinfo.gap
run: rm sysinfo.gap && make SYSINFO_CC=gcc SYSINFO_CXX=g++ sysinfo.gap
- name: Download required GAP packages
run: make bootstrap-pkg-minimal
- name: Run tests in VM
uses: uraimo/run-on-arch-action@v2
with:
arch: s390x
distro: ubuntu22.04
# Not required, but speeds up builds
githubToken: ${{ github.token }}
# The shell to run commands with in the container
shell: /bin/sh
# Install some dependencies in the container. This speeds up builds if
# you are also using githubToken. Any dependencies installed here will
# be part of the container image that gets cached, so subsequent
# builds don't have to re-install them. The image layer is cached
# publicly in your project's package repository, so it is vital that
# no secrets are present in the container state or logs.
install: |
apt-get update -q -y
# we need build-essential for make and gcc (the latter is used by gac and
# hence by the tests involving mockpkg)
apt-get install -q -y build-essential git expect libgmp10 libreadline8 zlib1g
# Do the thing
run: |
set -x
git config --global --add safe.directory $PWD # see https://github.com/gap-system/gap/issues/4861
make citests
openbsd:
runs-on: ubuntu-latest
name: Test in OpenBSD
env:
AUTOCONF_VERSION: 2.71
steps:
- uses: actions/checkout@v4
- name: Download required GAP packages
run: |
wget https://github.com/gap-system/PackageDistro/releases/download/latest/packages-required.tar.gz
mkdir pkg
cd pkg
tar xvf ../packages-required.tar.gz
- name: Test in OpenBSD
id: test
uses: vmactions/openbsd-vm@v1
with:
envs: 'AUTOCONF_VERSION'
usesh: true
prepare: |
pkg_add bash gmake autoconf-2.71 expect gmp
# Do the thing
run: |
set -x
git config --global --add safe.directory $PWD # see https://github.com/gap-system/gap/issues/4861
rm -rf extern # ensure we don't build and link against bundled libraries
./autogen.sh
./configure --with-gmp=/usr/local --without-readline
gmake -j2 V=1
#gmake check
#gmake citests
dev/ci.sh testexpect testmockpkg testspecial test-compile testlibgap testkernel testworkspace testinstall