[macos] Update debugging for patch #85
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
# 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/ | |
# | |
# 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 | |
name: Produce tarball and make check | |
on: | |
push: | |
schedule: | |
# Doc: https://docs.github.com/en/actions/using-workflows/events-that-trigger-workflows#schedule | |
# POSIX cron syntax: https://pubs.opengroup.org/onlinepubs/9699919799/utilities/crontab.html#tag_20_25_07 | |
- cron: '31 4 * * 1' | |
workflow_dispatch: | |
# Variables. | |
env: | |
package: libtool | |
branch: development | |
jobs: | |
build-tarball: | |
if: ${{ startsWith(github.event.head_commit.message, '[all]') }} | |
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-tarball.sh '${{ env.package }}' '${{ env.branch }}' | |
# 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: 7 | |
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: 7 | |
compression-level: 0 | |
overwrite: true | |
# We can run max. 20 "make check" jobs in parallel, max. 5 of them being on macOS. | |
# See https://docs.github.com/en/actions/learn-github-actions/usage-limits-billing-and-administration | |
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: | | |
pwd | |
export CPPFLAGS="-Wall" | |
./build-on.sh '${{ env.package }}' '' 'make' | |
# 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() }} | |
uses: actions/upload-artifact@v4 | |
with: | |
name: logs-linux-gnu-ubuntu | |
path: | | |
${{ env.package }}-*/build/config.cache | |
${{ env.package }}-*/build/config.log | |
${{ env.package }}-*/build/config.status | |
${{ env.package }}-*/build/log[123] | |
${{ env.package }}-*/build/tests/testsuite.dir/*/testsuite.log | |
${{ env.package }}-*/build/gnulib-tests/test-suite.log | |
retention-days: 7 | |
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 | |
: "Install CentOS Linux packages" | |
: "List of packages: http://mirror.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' | |
# 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() }} | |
uses: actions/upload-artifact@v4 | |
with: | |
name: logs-linux-gnu-centos | |
path: | | |
${{ env.package }}-*/build/config.cache | |
${{ env.package }}-*/build/config.log | |
${{ env.package }}-*/build/config.status | |
${{ env.package }}-*/build/log[123] | |
${{ env.package }}-*/build/tests/testsuite.dir/*/testsuite.log | |
${{ env.package }}-*/build/gnulib-tests/test-suite.log | |
retention-days: 7 | |
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' | |
# 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() }} | |
uses: actions/upload-artifact@v4 | |
with: | |
name: logs-linux-alpine | |
path: | | |
${{ env.package }}-*/build/config.cache | |
${{ env.package }}-*/build/config.log | |
${{ env.package }}-*/build/config.status | |
${{ env.package }}-*/build/log[123] | |
${{ env.package }}-*/build/tests/testsuite.dir/*/testsuite.log | |
${{ env.package }}-*/build/gnulib-tests/test-suite.log | |
retention-days: 7 | |
overwrite: true | |
check-macos: | |
name: make check on macOS | |
needs: build-tarball | |
# Doc: https://docs.github.com/en/actions/using-jobs/using-a-matrix-for-your-jobs | |
strategy: | |
fail-fast: false | |
matrix: | |
os: [macos-11, macos-12, macos-13, macos-14] | |
runs-on: ${{ matrix.os }} | |
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 Homebrew packages. | |
# List of packages: https://formulae.brew.sh/ | |
- run: brew install m4 automake gfortran | |
# m4 is now installed in ${HOMEBREW_PREFIX-/usr/local}/opt/m4/bin/m4. | |
# automake is now installed in /usr/local/bin/automake = ${HOMEBREW_PREFIX-/usr/local}/opt/automake/bin/automake. | |
# gfortran is now installed in ${HOMEBREW_PREFIX-/usr/local}/opt/gfortran/bin/gfortran = ${HOMEBREW_PREFIX-/usr/local}/opt/gcc/bin/gfortran. | |
# (HOMEBREW_PREFIX is currently /opt/homebrew on the macOS 14/arm64 machines, and undefined on the older machines.) | |
- run: | | |
PATH=${HOMEBREW_PREFIX-/usr/local}/opt/m4/bin:${HOMEBREW_PREFIX-/usr/local}/opt/gcc/bin:/usr/local/bin:$PATH | |
: "Set M4 environment variable, in order to ignore the broken 'gm4' that is also found in PATH." | |
export M4=m4 | |
pwd | |
export CPPFLAGS="-Wall" | |
./build-on.sh '${{ env.package }}' '' 'make' | |
# 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() }} | |
uses: actions/upload-artifact@v4 | |
with: | |
name: logs-${{ matrix.os }} | |
path: | | |
${{ env.package }}-*/build/config.cache | |
${{ env.package }}-*/build/config.log | |
${{ env.package }}-*/build/config.status | |
${{ env.package }}-*/build/log[123] | |
${{ env.package }}-*/build/tests/testsuite.dir/*/testsuite.log | |
${{ env.package }}-*/build/gnulib-tests/test-suite.log | |
retention-days: 7 | |
overwrite: true | |
check-freebsd: | |
name: make check on FreeBSD | |
needs: build-tarball | |
# The FreeBSD runners sometimes get stuck. | |
timeout-minutes: 15 | |
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 | |
# Doc: https://github.com/vmactions/freebsd-vm | |
- uses: vmactions/freebsd-vm@v1 | |
with: | |
release: '14.0' | |
mem: 1024 | |
usesh: true | |
run: | | |
set -x | |
uname -a | |
id | |
env | LC_ALL=C sort | |
pwd | |
: "Install FreeBSD packages" | |
: "List of packages: https://ports.freebsd.org/cgi/ports.cgi" | |
pkg install -y m4 automake gcc | |
ls -l | |
export CPPFLAGS="-I/usr/local/include -Wall" | |
export LDFLAGS="-L/usr/local/lib" | |
./build-on.sh '${{ env.package }}' '' 'make' | |
# 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() }} | |
uses: actions/upload-artifact@v4 | |
with: | |
name: logs-freebsd | |
path: | | |
${{ env.package }}-*/build/config.cache | |
${{ env.package }}-*/build/config.log | |
${{ env.package }}-*/build/config.status | |
${{ env.package }}-*/build/log[123] | |
${{ env.package }}-*/build/tests/testsuite.dir/*/testsuite.log | |
${{ env.package }}-*/build/gnulib-tests/test-suite.log | |
retention-days: 7 | |
overwrite: true | |
check-netbsd: | |
name: make check on NetBSD | |
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 | |
# Doc: https://github.com/vmactions/netbsd-vm | |
- uses: vmactions/netbsd-vm@v1 | |
with: | |
release: '10.0' | |
mem: 1024 | |
usesh: true | |
run: | | |
set -x | |
uname -a | |
id | |
env | LC_ALL=C sort | |
pwd | |
: "Install NetBSD packages" | |
: "List of packages: https://ftp.netbsd.org/pub/pkgsrc/current/pkgsrc/index-all.html" | |
: "The only Fortran compiler available here is flang, not easy to use." | |
/usr/sbin/pkg_add m4 automake autoconf | |
ls -l | |
export CPPFLAGS="-I/usr/pkg/include -Wall" | |
export LDFLAGS="-L/usr/pkg/lib" | |
./build-on.sh '${{ env.package }}' '' 'make' | |
# 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() }} | |
uses: actions/upload-artifact@v4 | |
with: | |
name: logs-netbsd | |
path: | | |
${{ env.package }}-*/build/config.cache | |
${{ env.package }}-*/build/config.log | |
${{ env.package }}-*/build/config.status | |
${{ env.package }}-*/build/log[123] | |
${{ env.package }}-*/build/tests/testsuite.dir/*/testsuite.log | |
${{ env.package }}-*/build/gnulib-tests/test-suite.log | |
retention-days: 7 | |
overwrite: true | |
check-openbsd: | |
name: make check on OpenBSD | |
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 | |
# Doc: https://github.com/vmactions/openbsd-vm | |
- uses: vmactions/openbsd-vm@v1 | |
with: | |
release: '7.5' | |
mem: 1024 | |
usesh: true | |
# Avoid 'sync: sshfs' since it causes trouble with file timestamps | |
# and errors from chown() calls: | |
# - BSD tar error messages for r--r--r-- files: "tar: Unable to create ...: Permission denied" | |
# - GNU tar warnings "Cannot change ownership to uid 0, gid 0: Permission denied" | |
#sync: sshfs | |
run: | | |
set -x | |
uname -a | |
id | |
env | LC_ALL=C sort | |
pwd | |
: "Install OpenBSD packages" | |
: "List of packages: https://cdn.openbsd.org/pub/OpenBSD/7.5/packages/amd64/" | |
pkg_add m4 automake-1.16.5 autoconf-2.71 gmake gcc-11.2.0p11 g++-11.2.0p12 | |
ls -l /usr/bin/acl* /usr/bin/auto* /usr/local/bin/acl* /usr/local/bin/auto* | |
export PATH=/usr/local/bin:$PATH | |
: "The OpenBSD port of autoconf needs this. See <https://marc.info/?l=openbsd-misc&m=115868167816272&w=2>." | |
export AUTOCONF_VERSION=2.71 | |
: "The OpenBSD port of automake needs this, if more than one version is installed." | |
export AUTOMAKE_VERSION=1.16 | |
ls -l | |
export CPPFLAGS="-I/usr/local/include -Wall" | |
export LDFLAGS="-L/usr/local/lib" | |
./build-on.sh '${{ env.package }}' '' 'gmake' | |
# 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() }} | |
uses: actions/upload-artifact@v4 | |
with: | |
name: logs-openbsd | |
path: | | |
${{ env.package }}-*/build/config.cache | |
${{ env.package }}-*/build/config.log | |
${{ env.package }}-*/build/config.status | |
${{ env.package }}-*/build/log[123] | |
${{ env.package }}-*/build/tests/testsuite.dir/*/testsuite.log | |
${{ env.package }}-*/build/gnulib-tests/test-suite.log | |
retention-days: 7 | |
overwrite: true | |
check-solaris11: | |
name: make check on Solaris 11 | |
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 | |
# Doc: https://github.com/vmactions/solaris-vm | |
- uses: vmactions/solaris-vm@v1 | |
with: | |
# We can choose among | |
# - the '11.4' image and installing gcc from the Oracle packages site, or | |
# - the '11.4-gcc' image, that has gcc installed in /opt/csw/bin. | |
release: '11.4' | |
mem: 2048 | |
prepare: | | |
: "Install Solaris packages" | |
: "List of packages: http://pkg.oracle.com/solaris/release/en/index.shtml" | |
pkg install gnu-m4 automake autoconf gcc gcc-c++ gcc-gfortran | |
run: | | |
set -x | |
uname -a | |
id | |
env | LC_ALL=C sort | |
pwd | |
ls -l | |
: "The locale set by default, C.UTF-8, is not a valid locale on Solaris 11." | |
: "This causes a failure of the test-update-copyright.sh test." | |
export LANG=en_US.UTF-8 | |
export CPPFLAGS="-Wall" | |
export CC="gcc -m64" | |
export CXX="g++ -m64" | |
./build-on.sh '${{ env.package }}' '' 'make' | |
# 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() }} | |
uses: actions/upload-artifact@v4 | |
with: | |
name: logs-solaris11 | |
path: | | |
${{ env.package }}-*/build/config.cache | |
${{ env.package }}-*/build/config.log | |
${{ env.package }}-*/build/config.status | |
${{ env.package }}-*/build/log[123] | |
${{ env.package }}-*/build/tests/testsuite.dir/*/testsuite.log | |
${{ env.package }}-*/build/gnulib-tests/test-suite.log | |
retention-days: 7 | |
overwrite: true | |
check-solaris11-omnios: | |
name: make check on Solaris 11 OmniOS | |
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 | |
# Doc: https://github.com/vmactions/omnios-vm | |
- uses: vmactions/omnios-vm@v1 | |
with: | |
release: "r151048" | |
mem: 2048 | |
prepare: | | |
: "Install Solaris packages" | |
: "List of packages: https://pkg.omnios.org/r151048/core/en/index.shtml" | |
pkg install \ | |
developer/build/automake developer/build/autoconf \ | |
developer/gcc13 developer/object-file system/header system/library/math \ | |
developer/build/gnu-make | |
run: | | |
set -x | |
uname -a | |
id | |
env | LC_ALL=C sort | |
pwd | |
ls -l | |
export CPPFLAGS="-Wall" | |
./build-on.sh '${{ env.package }}' '' 'gmake' | |
# 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() }} | |
uses: actions/upload-artifact@v4 | |
with: | |
name: logs-solaris11-omnios | |
path: | | |
${{ env.package }}-*/build/config.cache | |
${{ env.package }}-*/build/config.log | |
${{ env.package }}-*/build/config.status | |
${{ env.package }}-*/build/log[123] | |
${{ env.package }}-*/build/tests/testsuite.dir/*/testsuite.log | |
${{ env.package }}-*/build/gnulib-tests/test-suite.log | |
retention-days: 7 | |
overwrite: true | |
check-cygwin: | |
name: make check on Cygwin | |
needs: build-tarball | |
# Doc: https://docs.github.com/en/actions/using-jobs/using-a-matrix-for-your-jobs | |
strategy: | |
fail-fast: false | |
matrix: | |
bitness: [32, 64] | |
# On 32-bit Cygwin, the test "static linking flags for programs" would | |
# hang indefinitely. | |
exclude: | |
- bitness: 32 | |
runs-on: windows-2022 | |
defaults: | |
run: | |
shell: C:\cygwin\bin\bash.exe -eo pipefail -o igncr '{0}' | |
env: | |
CYGWIN_NOWINPATH: 1 | |
steps: | |
# This is needed because we run a script stored in this repository. | |
- run: git config --global core.autocrlf input | |
shell: cmd | |
- 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 | |
# Doc: https://github.com/cygwin/cygwin-install-action | |
- uses: cygwin/cygwin-install-action@v4 | |
with: | |
platform: ${{ matrix.bitness == 32 && 'x86' || 'x86_64' }} | |
# Install Cygwin packages. | |
# List of packages: https://cygwin.com/packages/package_list.html | |
packages: m4 automake gcc-core make | |
- name: cygcheck | |
run: cygcheck -V | |
- name: cygcheck | |
run: cygcheck -s -r | |
- name: Windows version | |
run: cmd /c ver | |
- run: uname -a | |
- run: id | |
- run: env | LC_ALL=C sort | |
- run: pwd | |
- run: ls -l | |
- run: echo "$PATH" | |
- run: ls -l /usr/bin | |
- name: Build in Cygwin | |
run: | | |
export CPPFLAGS="-Wall" | |
./build-on.sh '${{ env.package }}' '' 'make' | |
# 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() }} | |
uses: actions/upload-artifact@v4 | |
with: | |
name: logs-cygwin${{ matrix.bitness }} | |
path: | | |
${{ env.package }}-*/build/config.cache | |
${{ env.package }}-*/build/config.log | |
${{ env.package }}-*/build/config.status | |
${{ env.package }}-*/build/log[123] | |
${{ env.package }}-*/build/tests/testsuite.dir/*/testsuite.log | |
${{ env.package }}-*/build/gnulib-tests/test-suite.log | |
retention-days: 7 | |
overwrite: true | |
check-mingw: | |
name: make check on mingw | |
needs: build-tarball | |
# Doc: https://docs.github.com/en/actions/using-jobs/using-a-matrix-for-your-jobs | |
strategy: | |
fail-fast: false | |
matrix: | |
bitness: [32, 64] | |
runs-on: windows-2022 | |
defaults: | |
run: | |
shell: C:\cygwin\bin\bash.exe -eo pipefail -o igncr '{0}' | |
env: | |
CYGWIN_NOWINPATH: 1 | |
steps: | |
# This is needed because we run a script stored in this repository. | |
- run: git config --global core.autocrlf input | |
shell: cmd | |
- 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 | |
# Doc: https://github.com/cygwin/cygwin-install-action | |
- uses: cygwin/cygwin-install-action@v4 | |
with: | |
platform: x86_64 | |
# Install Cygwin packages. | |
# List of packages: https://cygwin.com/packages/package_list.html | |
packages: m4 automake ${{ matrix.bitness == 32 && 'mingw64-i686-gcc-core mingw64-i686-headers mingw64-i686-runtime' || 'mingw64-x86_64-gcc-core mingw64-x86_64-headers mingw64-x86_64-runtime' }} make | |
- name: cygcheck | |
run: cygcheck -V | |
- name: cygcheck | |
run: cygcheck -s -r | |
- name: Windows version | |
run: cmd /c ver | |
- run: uname -a | |
- run: id | |
- run: env | LC_ALL=C sort | |
- run: pwd | |
- run: ls -l | |
- run: echo "$PATH" | |
- run: ls -l /usr/bin | |
- name: Build in Cygwin | |
run: | | |
set -x | |
PATH=/usr/${{ matrix.bitness == 32 && 'i686' || 'x86_64' }}-w64-mingw32/sys-root/mingw/bin:$PATH | |
export CPPFLAGS="-Wall" | |
export CC=${{ matrix.bitness == 32 && 'i686' || 'x86_64' }}-w64-mingw32-gcc | |
./build-on.sh '${{ env.package }}' '--host=${{ matrix.bitness == 32 && 'i686' || 'x86_64' }}-w64-mingw32' 'make' | |
# 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() }} | |
uses: actions/upload-artifact@v4 | |
with: | |
name: logs-mingw${{ matrix.bitness }} | |
path: | | |
${{ env.package }}-*/build/config.cache | |
${{ env.package }}-*/build/config.log | |
${{ env.package }}-*/build/config.status | |
${{ env.package }}-*/build/log[123] | |
${{ env.package }}-*/build/tests/testsuite.dir/*/testsuite.log | |
${{ env.package }}-*/build/gnulib-tests/test-suite.log | |
retention-days: 7 | |
overwrite: true | |
check-msvc: | |
name: make check on MSVC | |
needs: build-tarball | |
# These test runs show more than 50 test failures. | |
if: ${{ false }} | |
# Doc: https://docs.github.com/en/actions/using-jobs/using-a-matrix-for-your-jobs | |
strategy: | |
fail-fast: false | |
matrix: | |
bitness: [32, 64] | |
runs-on: windows-2022 | |
defaults: | |
run: | |
shell: C:\cygwin\bin\bash.exe -eo pipefail -o igncr '{0}' | |
env: | |
CYGWIN_NOWINPATH: 1 | |
steps: | |
# This is needed because we run a script stored in this repository. | |
- run: git config --global core.autocrlf input | |
shell: cmd | |
- 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 | |
# Doc: https://github.com/ilammy/msvc-dev-cmd | |
- uses: ilammy/msvc-dev-cmd@v1 | |
with: | |
arch: ${{ matrix.bitness == 32 && 'x86' || 'x64' }} | |
# Doc: https://github.com/cygwin/cygwin-install-action | |
- uses: cygwin/cygwin-install-action@v4 | |
with: | |
platform: x86_64 | |
# Install Cygwin packages. | |
# List of packages: https://cygwin.com/packages/package_list.html | |
packages: wget m4 automake make | |
- name: cygcheck | |
run: cygcheck -V | |
- name: cygcheck | |
run: cygcheck -s -r | |
- name: Windows version | |
run: cmd /c ver | |
- run: uname -a | |
- run: id | |
- run: env | LC_ALL=C sort | |
- run: pwd | |
- run: ls -l | |
- run: echo "$PATH" | |
- run: ls -l /usr/bin | |
- run: | | |
wget -O ar-lib 'https://git.savannah.gnu.org/gitweb/?p=automake.git;a=blob_plain;f=lib/ar-lib;hb=HEAD' | |
wget -O compile 'https://git.savannah.gnu.org/gitweb/?p=automake.git;a=blob_plain;f=lib/compile;hb=HEAD' | |
chmod a+x ar-lib compile | |
- name: Build in Cygwin | |
env: | |
arch: ${{ matrix.bitness == 32 && 'x86' || 'x64' }} | |
pathelementsuffix: ${{ matrix.bitness == 64 && '/amd64' || '' }} | |
libelementsuffix: ${{ matrix.bitness == 64 && '\amd64' || '' }} | |
run: | | |
set -x | |
: "Windows C library headers and libraries." | |
WindowsCrtIncludeDir='C:\Program Files (x86)\Windows Kits\10\Include\10.0.10240.0\ucrt' | |
WindowsCrtLibDir='C:\Program Files (x86)\Windows Kits\10\Lib\10.0.10240.0\ucrt\' | |
INCLUDE="${WindowsCrtIncludeDir};$INCLUDE" | |
LIB="${WindowsCrtLibDir}${arch};$LIB" | |
: "Windows API headers and libraries." | |
WindowsSdkIncludeDir='C:\Program Files (x86)\Windows Kits\8.1\Include\' | |
WindowsSdkLibDir='C:\Program Files (x86)\Windows Kits\8.1\Lib\winv6.3\um\' | |
INCLUDE="${WindowsSdkIncludeDir}um;${WindowsSdkIncludeDir}shared;$INCLUDE" | |
LIB="${WindowsSdkLibDir}${arch};$LIB" | |
: "Visual C++ tools, headers and libraries." | |
VSINSTALLDIR='C:\Program Files (x86)\Microsoft Visual Studio 14.0' | |
VCINSTALLDIR="${VSINSTALLDIR}"'\VC' | |
PATH=`cygpath -u "${VCINSTALLDIR}"`/bin${pathelementsuffix}:"$PATH" | |
INCLUDE="${VCINSTALLDIR}"'\include;'"${INCLUDE}" | |
LIB="${VCINSTALLDIR}"'\lib${libelementsuffix};'"${LIB}" | |
export INCLUDE LIB | |
: "Possible values are _WIN32_WINNT_WINXP, _WIN32_WINNT_VISTA, _WIN32_WINNT_WIN7" | |
win32_target=_WIN32_WINNT_WINXP | |
export CPPFLAGS="-D_WIN32_WINNT=$win32_target" | |
export CC="`pwd`/compile cl -nologo"; export CFLAGS="-MD" | |
export LD="link" | |
export NM="dumpbin -symbols" | |
export STRIP=":" | |
export AR="`pwd`/ar-lib lib" | |
export RANLIB=":" | |
./build-on.sh '${{ env.package }}' '--host=${{ matrix.bitness == 32 && 'i686' || 'x86_64' }}-w64-mingw32' 'make' | |
# 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() }} | |
uses: actions/upload-artifact@v4 | |
with: | |
name: logs-msvc${{ matrix.bitness }} | |
path: | | |
${{ env.package }}-*/build/config.cache | |
${{ env.package }}-*/build/config.log | |
${{ env.package }}-*/build/config.status | |
${{ env.package }}-*/build/log[123] | |
${{ env.package }}-*/build/tests/testsuite.dir/*/testsuite.log | |
${{ env.package }}-*/build/gnulib-tests/test-suite.log | |
retention-days: 7 | |
overwrite: true | |
# This is not a platform-specific test, but very useful for finding bugs. | |
check-sanitized: | |
name: make check with sanitizers | |
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: | | |
pwd | |
export CPPFLAGS="-Wall" | |
export CC="clang -fsanitize=address,undefined,signed-integer-overflow,shift,integer-divide-by-zero" | |
export LDFLAGS="-fsanitize=address,undefined,signed-integer-overflow,shift,integer-divide-by-zero" | |
export CFLAGS="-O0 -fno-omit-frame-pointer -ggdb" | |
export ASAN_OPTIONS="detect_leaks=0 abort_on_error=1 allocator_may_return_null=1" | |
./build-on.sh '${{ env.package }}' '' 'make' | |
# 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() }} | |
uses: actions/upload-artifact@v4 | |
with: | |
name: logs-sanitized | |
path: | | |
${{ env.package }}-*/build/config.cache | |
${{ env.package }}-*/build/config.log | |
${{ env.package }}-*/build/config.status | |
${{ env.package }}-*/build/log[123] | |
${{ env.package }}-*/build/tests/testsuite.dir/*/testsuite.log | |
${{ env.package }}-*/build/gnulib-tests/test-suite.log | |
retention-days: 7 | |
overwrite: true |