mirror of
https://github.com/TREX-CoE/qmckl.git
synced 2024-12-22 12:23:56 +01:00
Multi-arch CI
This commit is contained in:
parent
abb30cf8e2
commit
1516f06e03
90
.github/workflows/multi-arch.yml
vendored
Normal file
90
.github/workflows/multi-arch.yml
vendored
Normal file
@ -0,0 +1,90 @@
|
||||
on: [push, pull_request]
|
||||
|
||||
jobs:
|
||||
build_job:
|
||||
|
||||
runs-on: ubuntu-latest
|
||||
name: Build on ${{ matrix.distro }} ${{ matrix.arch }}
|
||||
|
||||
# Run steps on a matrix of arch/distro combinations
|
||||
strategy:
|
||||
matrix:
|
||||
include:
|
||||
- arch: armv7
|
||||
distro: jessie
|
||||
- arch: aarch64
|
||||
distro: ubuntu18.04
|
||||
- arch: ppc64le
|
||||
distro: alpine_latest
|
||||
- arch: s390x
|
||||
distro: fedora_latest
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
- uses: uraimo/run-on-arch-action@v2.0.5
|
||||
name: Build artifact
|
||||
id: build
|
||||
with:
|
||||
arch: ${{ matrix.arch }}
|
||||
distro: ${{ matrix.distro }}
|
||||
|
||||
# Not required, but speeds up builds
|
||||
githubToken: ${{ github.token }}
|
||||
|
||||
# Create an artifacts directory
|
||||
setup: |
|
||||
mkdir -p "${PWD}/artifacts"
|
||||
|
||||
# Mount the artifacts directory as /artifacts in the container
|
||||
dockerRunArgs: |
|
||||
--volume "${PWD}/artifacts:/artifacts"
|
||||
|
||||
# Pass some environment variables to the container
|
||||
env: | # YAML, but pipe character is necessary
|
||||
artifact_name: log-${{ matrix.distro }}_${{ matrix.arch }}
|
||||
|
||||
# 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: |
|
||||
case "${{ matrix.distro }}" in
|
||||
ubuntu*|jessie|stretch|buster)
|
||||
apt-get update -q -y
|
||||
apt-get install -q -y emacs
|
||||
apt-get install -q -y autoconf
|
||||
;;
|
||||
fedora*)
|
||||
dnf -y update
|
||||
dnf -y install emacs
|
||||
dnf -y install autoconf
|
||||
;;
|
||||
alpine*)
|
||||
apk update
|
||||
apk add emacs
|
||||
apk add autoconf
|
||||
;;
|
||||
esac
|
||||
|
||||
# Produce a binary artifact and place it in the mounted volume
|
||||
run: |
|
||||
./autogen.sh
|
||||
QMCKL_DEVEL=1 ./configure --enable-silent-rules --enable-maintainer-mode --enable-debug
|
||||
cp config.log "/artifacts/${artifact_name}"
|
||||
echo "Produced artifact at /artifacts/${artifact_name}"
|
||||
make -j 8
|
||||
make check
|
||||
make distcheck
|
||||
|
||||
- name: Show the artifact
|
||||
# Items placed in /artifacts in the container will be in
|
||||
# ${PWD}/artifacts on the host.
|
||||
run: |
|
||||
ls -al "${PWD}/artifacts"
|
||||
|
||||
|
3
.github/workflows/test-build.yml
vendored
3
.github/workflows/test-build.yml
vendored
@ -7,9 +7,10 @@ on:
|
||||
branches: [ master ]
|
||||
|
||||
jobs:
|
||||
test:
|
||||
x86_ubuntu:
|
||||
|
||||
runs-on: ubuntu-latest
|
||||
name: x86 Ubuntu latest
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
|
Loading…
Reference in New Issue
Block a user