Skip to content

CI

CI #261

Workflow file for this run

name: CI
permissions:
contents: read
on:
pull_request:
push:
branches:
- main
- dev
schedule:
- cron: '0 0 * * *'
workflow_dispatch:
defaults:
run:
shell: bash
concurrency:
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.sha }}
cancel-in-progress: true
jobs:
tidy:
uses: taiki-e/github-actions/.github/workflows/tidy.yml@main
test:
strategy:
fail-fast: false
matrix:
include:
# Test all non-deprecated images listed in https://github.com/actions/runner-images#available-images,
# and also msys64 & cygwin, which have different behavior then default https://github.com/taiki-e/install-action/pull/518#issuecomment-2160736760.
- os: ubuntu-20.04
- os: ubuntu-22.04
- os: ubuntu-24.04
- os: macos-12
- os: macos-13
- os: macos-14
- os: windows-2019
- os: windows-2019
bash: msys64
- os: windows-2019
bash: cygwin
- os: windows-2022
- os: windows-2022
bash: msys64
- os: windows-2022
bash: cygwin
runs-on: ${{ matrix.os }}
steps:
- run: |
printf 'C:\msys64\mingw32\bin\n' >>"${GITHUB_PATH}"
printf 'C:\msys64\usr\bin\n' >>"${GITHUB_PATH}"
if: matrix.bash == 'msys64'
- run: |
choco install --no-progress --requirechecksums cygwin
printf 'C:\tools\cygwin\bin\n' >>"${GITHUB_PATH}"
printf 'C:\tools\cygwin\usr\bin\n' >>"${GITHUB_PATH}"
if: matrix.bash == 'cygwin'
# TODO: use the current branch instead of @main
- uses: taiki-e/checkout-action@main
- uses: taiki-e/install-action@shellcheck
- uses: taiki-e/install-action@shfmt
- run: git ls-files
- run: ./tools/tidy.sh
if: matrix.os != 'windows-2019'
# For comparison
actions-checkout:
strategy:
fail-fast: false
matrix:
os:
- ubuntu-latest
- macos-latest
- windows-latest
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v4
with:
persist-credentials: false
- uses: taiki-e/install-action@shellcheck
- uses: taiki-e/install-action@shfmt
- run: git ls-files
- run: ./tools/tidy.sh
test-container:
strategy:
fail-fast: false
matrix:
container:
- ubuntu:14.04 # glibc 2.19
- ubuntu:16.04 # glibc 2.23
- ubuntu:18.04 # glibc 2.27
- ubuntu:20.04 # glibc 2.31
- ubuntu:22.04 # glibc 2.35
- ubuntu:24.04 # glibc 2.39
- debian:9-slim # glibc 2.24
- debian:10-slim # glibc 2.28
- debian:11-slim # glibc 2.31
- debian:12-slim # glibc 2.36
- fedora:latest # glibc 2.39 (as of fedora 40)
- almalinux:8 # glibc 2.28
- almalinux:8-minimal # glibc 2.28
- almalinux:9 # glibc 2.34
- almalinux:9-minimal # glibc 2.34
- centos:6 # glibc 2.12
- centos:7 # glibc 2.17
- opensuse/leap:latest # glibc 2.38 (as of leap 15.6)
- opensuse/tumbleweed:latest # glibc 2.39 (as of 2024-07-19)
- archlinux:latest # glibc 2.39 (as of 2024-07-19)
- alpine:latest # musl 1.2.5 (as of alpine 3.20)
- openwrt/rootfs:x86-64-openwrt-23.05 # musl 1.2.4
runs-on: ubuntu-latest
timeout-minutes: 60
container: ${{ matrix.container }}
steps:
- name: Install requirements (old debian)
run: |
set -CeEuxo pipefail
# In Debian, the old repositories is removed from the main mirrors some time after EoL.
sed -i /etc/apt/sources.list -e 's/deb.debian.org/archive.debian.org/g' \
-e 's|security.debian.org|archive.debian.org/|g' \
-e '/stretch-updates/d'
if: startsWith(matrix.container, 'debian:9')
- name: Install requirements (centos)
run: |
set -CeEuxo pipefail
# In CentOS, the old repositories is removed from the main mirrors just after EoL.
# https://github.com/rust-lang/rust/pull/126352
sed -i /etc/yum.repos.d/*.repo -e 's!^mirrorlist!#mirrorlist!' \
-e 's!^#baseurl=http://mirror.centos.org/!baseurl=https://vault.centos.org/!'
sed -i 's/enabled=1/enabled=0/' /etc/yum/pluginconf.d/fastestmirror.conf
if [[ "${{ matrix.container }}" == "centos:6" ]]; then
# CentOS 6's git (1.7.1) has no --local/--no-recurse-submodules.
# And even if we don't pass those flags, that version of git will not work
# anyway due to of "fatal: Couldn't find remote ref" error.
yum install -y openssh-clients perl perl-Error perl-TermReadKey rsync
rpm -i \
https://vault.ius.io/el6/x86_64/packages/p/perl-Git18-1.8.5.5-4.ius.el6.noarch.rpm \
https://vault.ius.io/el6/x86_64/packages/g/git18-1.8.5.5-4.ius.el6.x86_64.rpm
fi
if: startsWith(matrix.container, 'centos')
# TODO: use the current branch instead of @main
- uses: taiki-e/checkout-action@main
- run: git ls-files