Skip to content

[all] Test pipeline #193

[all] Test pipeline

[all] Test pipeline #193

Workflow file for this run

# A GitHub Actions workflow that builds a package on many platforms.
# Copyright (C) 2024 Free Software Foundation, Inc.
#
# This file is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published
# by the Free Software Foundation, either version 3 of the License,
# or (at your option) any later version.
#
# This file is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <https://www.gnu.org/licenses/>.
# Reference documentation for this file:
# https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions
#
# Syntax of multiline strings in YAML: https://yaml-multiline.info/
#
# To execute this workflow, specify "[linux]" at the start of the head
# commit message that is pushed. For example:
# git commit -m "[linux] Test patch"
#
# Customization:
# - Review and adapt the part of this file before the 'jobs:' line.
# - You can disable a particular job by adding a line
# if: ${{ false }}
# - You can disable a particular matrix value for a particular job by adding an
# 'exclude' element to the 'matrix' element, such as:
# exclude:
# - bitness: 64
# - You can execute pre-release testing by specifying "[pre-release]" anywhere
# in the head commit message that is pushed. For example:
# git commit -m "[linux] [pre-release] Test patch"
# - NOTE: By default, all OS-specific logs are not uploaded for download
# when executing pre-release testing. To enable, update the following:
# if: ${{ always() && !contains(github.event.head_commit.message, '[pre-release]') }}
# To this:
# if: ${{ always() }}
name: Linux make check
on:
push:
# Variables.
env:
package: libtool
branch: development
jobs:
build-tarball:
if: ${{ startsWith(github.event.head_commit.message, '[linux]') }}
runs-on: ubuntu-22.04
steps:
# This is needed because we run a script stored in this repository.
- uses: actions/checkout@v4
- run: uname -a
- run: id
- run: env | LC_ALL=C sort
- run: pwd
# Install Ubuntu packages.
# List of packages: https://packages.ubuntu.com/
- run: sudo apt update; sudo apt install help2man texlive-base texlive-latex-base
- run: |
./build-dev-tarball.sh '${{ env.package }}' '${{ env.branch }}' '${{ github.event.head_commit.message }}'
# Doc: https://github.com/actions/upload-artifact?tab=readme-ov-file#usage
- if: ${{ failure() }}
uses: actions/upload-artifact@v4
with:
name: logs-build-tarball-failed
path: |
${{ env.package }}/config.cache
${{ env.package }}/config.log
${{ env.package }}/config.status
${{ env.package }}/log[1234]
${{ env.package }}/tests/testsuite.dir/*/testsuite.log
retention-days: 3
overwrite: true
# Doc: https://docs.github.com/en/actions/using-workflows/storing-workflow-data-as-artifacts
# https://github.com/actions/upload-artifact?tab=readme-ov-file#usage
- uses: actions/upload-artifact@v4
with:
name: tarball
path: ${{ env.package }}/${{ env.package }}-*.tar.gz
if-no-files-found: error
retention-days: 3
compression-level: 0
overwrite: true
check-linux-gnu-ubuntu:
name: make check on Ubuntu GNU/Linux
needs: build-tarball
runs-on: ubuntu-22.04
steps:
# This is needed because we run a script stored in this repository.
- uses: actions/checkout@v4
# Download the artifact to $GITHUB_WORKSPACE.
# Doc: https://github.com/actions/download-artifact?tab=readme-ov-file#usage
- uses: actions/download-artifact@v4
with:
name: tarball
- run: uname -a
- run: id
- run: env | LC_ALL=C sort
- run: pwd
# Install Ubuntu packages.
# List of packages: https://packages.ubuntu.com/
# - run: sudo apt update; sudo apt install ...
- run: sudo apt update; sudo apt install libgnustep-base-dev gobjc++
- run: |
pwd
export CPPFLAGS="-Wall"
./build-on.sh '${{ env.package }}' '' 'make' '' '${{ github.event.head_commit.message }}'
- if: ${{ always() && !contains(github.event.head_commit.message, '[pre-release]') }}
run: tar czf ${{ env.package }}-build.tar.gz ${{ env.package }}-*/
# Doc: https://docs.github.com/en/actions/using-workflows/storing-workflow-data-as-artifacts
# https://github.com/actions/upload-artifact?tab=readme-ov-file#usage
- if: ${{ always() && !contains(github.event.head_commit.message, '[pre-release]') }}
uses: actions/upload-artifact@v4
with:
name: logs-linux-gnu-ubuntu
path: ${{ env.package }}-build.tar.gz
if-no-files-found: error
retention-days: 3
compression-level: 0
overwrite: true
check-linux-gnu-centos:
name: make check on CentOS GNU/Linux
needs: build-tarball
runs-on: ubuntu-22.04
steps:
# This is needed because we run a script stored in this repository.
- uses: actions/checkout@v4
# Download the artifact to $GITHUB_WORKSPACE.
# Doc: https://github.com/actions/download-artifact?tab=readme-ov-file#usage
- uses: actions/download-artifact@v4
with:
name: tarball
- uses: addnab/docker-run-action@v3
with:
image: centos:7
options: -v ${{ github.workspace }}:/work
run: |
uname -a
id
env | LC_ALL=C sort
pwd
: "The CentOS packages repository has moved on 2024-07-01."
sed -i -e 's|^mirrorlist=|#mirrorlist=|' -e 's|^#baseurl=http://mirror\.centos\.org|baseurl=http://vault.centos.org|' /etc/yum.repos.d/CentOS-Base.repo
: "Install CentOS Linux packages"
: "List of packages: http://vault.centos.org/centos/7/os/x86_64/Packages/"
yum -y install m4 automake make gcc gcc-c++ gcc-gfortran
cd /work
ls -l
export CPPFLAGS="-Wall"
./build-on.sh '${{ env.package }}' '' 'make' '' '${{ github.event.head_commit.message }}'
- if: ${{ always() && !contains(github.event.head_commit.message, '[pre-release]') }}
run: tar czf ${{ env.package }}-build.tar.gz ${{ env.package }}-*/
# Doc: https://docs.github.com/en/actions/using-workflows/storing-workflow-data-as-artifacts
# https://github.com/actions/upload-artifact?tab=readme-ov-file#usage
- if: ${{ always() && !contains(github.event.head_commit.message, '[pre-release]') }}
uses: actions/upload-artifact@v4
with:
name: logs-linux-gnu-centos
path: ${{ env.package }}-build.tar.gz
if-no-files-found: error
retention-days: 3
compression-level: 0
overwrite: true
check-linux-gnu-alma:
name: make check on AlmaLinux GNU/Linux
needs: build-tarball
runs-on: ubuntu-22.04
steps:
# This is needed because we run a script stored in this repository.
- uses: actions/checkout@v4
# Download the artifact to $GITHUB_WORKSPACE.
# Doc: https://github.com/actions/download-artifact?tab=readme-ov-file#usage
- uses: actions/download-artifact@v4
with:
name: tarball
- uses: addnab/docker-run-action@v3
with:
image: almalinux:9
options: -v ${{ github.workspace }}:/work
run: |
uname -a
id
env | LC_ALL=C sort
pwd
: "Install AlmaLinux packages"
: "List of packages: https://repo.almalinux.org/almalinux/9/BaseOS/x86_64/os/Packages/"
: " https://repo.almalinux.org/almalinux/9/AppStream/x86_64/os/Packages/"
: " https://repo.almalinux.org/almalinux/9/CRB/x86_64/os/Packages/"
: " https://repo.almalinux.org/almalinux/9/devel/x86_64/os/Packages/"
: "Explanation: https://wiki.almalinux.org/repos/AlmaLinux.html"
yum -y install m4 automake make gcc gcc-c++ gcc-gfortran diffutils
cd /work
ls -l
export CPPFLAGS="-Wall"
./build-on.sh '${{ env.package }}' '' 'make' '' '${{ github.event.head_commit.message }}'
- if: ${{ always() && !contains(github.event.head_commit.message, '[pre-release]') }}
run: tar czf ${{ env.package }}-build.tar.gz ${{ env.package }}-*/
# Doc: https://docs.github.com/en/actions/using-workflows/storing-workflow-data-as-artifacts
# https://github.com/actions/upload-artifact?tab=readme-ov-file#usage
- if: ${{ always() && !contains(github.event.head_commit.message, '[pre-release]') }}
uses: actions/upload-artifact@v4
with:
name: logs-linux-gnu-alma
path: ${{ env.package }}-build.tar.gz
if-no-files-found: error
retention-days: 3
compression-level: 0
overwrite: true
check-linux-alpine:
name: make check on Alpine Linux
needs: build-tarball
runs-on: ubuntu-22.04
steps:
# This is needed because we run a script stored in this repository.
- uses: actions/checkout@v4
# Download the artifact to $GITHUB_WORKSPACE.
# Doc: https://github.com/actions/download-artifact?tab=readme-ov-file#usage
- uses: actions/download-artifact@v4
with:
name: tarball
- uses: addnab/docker-run-action@v3
with:
image: alpine:3
options: -v ${{ github.workspace }}:/work
run: |
uname -a
id
env | LC_ALL=C sort
pwd
: "Install Alpine Linux packages"
: "List of packages: https://pkgs.alpinelinux.org/packages"
apk add m4 automake autoconf make gcc musl-dev g++ gfortran
cd /work
ls -l
export CPPFLAGS="-Wall"
./build-on.sh '${{ env.package }}' '' 'make' '' '${{ github.event.head_commit.message }}'
- if: ${{ always() && !contains(github.event.head_commit.message, '[pre-release]') }}
run: tar czf ${{ env.package }}-build.tar.gz ${{ env.package }}-*/
# Doc: https://docs.github.com/en/actions/using-workflows/storing-workflow-data-as-artifacts
# https://github.com/actions/upload-artifact?tab=readme-ov-file#usage
- if: ${{ always() && !contains(github.event.head_commit.message, '[pre-release]') }}
uses: actions/upload-artifact@v4
with:
name: logs-linux-alpine
path: ${{ env.package }}-build.tar.gz
if-no-files-found: error
retention-days: 3
compression-level: 0
overwrite: true