switch termux docker image provider to a maintained one #947
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
# Copyright (c) 2022-2024 Guilherme Janczak <[email protected]> | |
# | |
# Permission to use, copy, modify, and distribute this software for any | |
# purpose with or without fee is hereby granted, provided that the above | |
# copyright notice and this permission notice appear in all copies. | |
# | |
# THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES | |
# WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF | |
# MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR | |
# ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES | |
# WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN | |
# ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF | |
# OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. | |
name: ' ' # empty name | |
on: [push, pull_request] | |
# GitHub Actions doesn't support YAML anchors, so there's a lot of code | |
# copypasted between jobs. You'll probably want to read the 'glibc:' task first, | |
# it's the one that requires the least hacks. | |
jobs: | |
bionic: | |
runs-on: ubuntu-latest | |
defaults: | |
run: | |
shell: docker run -t --rm termux/termux-docker:latest bash {0} | |
steps: | |
- name: setup docker | |
uses: docker://docker.io/termux/termux-docker:latest | |
- name: setup | |
run: | | |
pkg install -y ninja clang python | |
pip install meson | |
- uses: actions/[email protected] | |
- name: build | |
run: | | |
meson setup -Db_sanitize=address,undefined -Dtest_system=true build | |
meson compile -C build | |
- name: test | |
run: meson test --no-suite system -C build | |
- name: test_system | |
run: meson test --suite system -C build || true | |
- uses: actions/[email protected] | |
if: always() | |
with: | |
name: meson-logs-bionic | |
path: build/meson-logs | |
dietlibc: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/[email protected] | |
- name: setup | |
run: | | |
pip install meson ninja | |
sudo apt update | |
sudo apt install -y dietlibc-dev valgrind linux-headers-generic | |
- uses: actions/[email protected] | |
- name: build | |
run: | | |
CC='diet gcc' meson setup -Dtest_system=true \ | |
-Ddefault_library=static build | |
meson compile -C build | |
- name: test | |
run: meson test --wrapper valgrind --no-suite system -C build | |
- name: test_system | |
run: meson test --wrapper valgrind --suite system -C build || true | |
- uses: actions/[email protected] | |
if: always() | |
with: | |
name: meson-logs-dietlibc | |
path: build/meson-logs | |
emscripten: | |
runs-on: macos-latest | |
steps: | |
- name: setup | |
run: | | |
brew update | |
brew install meson samurai emscripten | |
- uses: actions/[email protected] | |
- name: build | |
run: | | |
meson setup -Ddefault_library=static -Dtest_system=true \ | |
--cross-file=.github/workflows/meson-emscripten.txt build | |
meson compile -C build | |
- name: test | |
run: meson test --no-suite system -C build | |
- name: test_system | |
run: meson test --suite system -C build || true | |
- uses: actions/[email protected] | |
if: always() | |
with: | |
name: meson-logs-emscripten | |
path: build/meson-logs | |
glibc: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/[email protected] | |
- name: setup | |
run: | | |
pip install meson ninja | |
sudo apt update | |
sudo apt install -y libasan6 | |
- uses: actions/[email protected] | |
- name: build | |
run: | | |
meson setup -Db_sanitize=address,undefined -Dtest_system=true build | |
meson compile -C build | |
- name: test | |
run: meson test --no-suite system -C build | |
- name: test_system | |
run: meson test --suite system -C build || true | |
- uses: actions/[email protected] | |
if: always() | |
with: | |
name: meson-logs-glibc | |
path: build/meson-logs | |
haiku: | |
runs-on: ubuntu-22.04 | |
container: 'docker.io/hectorm/qemu-haiku:latest' | |
steps: | |
# Copied from: https://github.com/hectorm/docker-qemu-haiku#github-actions | |
# Notice I changed make to meson in the 'Install packages' step. | |
- name: 'Wait until the VM is ready' | |
run: 'container-init & timeout 600 vmshell exit 0' | |
- name: 'Install packages' | |
run: 'vmshell pkgman install -y meson gcc haiku_devel' | |
- name: 'Checkout project' | |
uses: 'actions/checkout@main' | |
- name: 'Copy project to VM' | |
run: 'vmshell mkdir ./src/; tar -cf - ./ | vmshell tar -xf - -C ./src/' | |
# Now the rest is much of the same old. | |
- name: build | |
run: | | |
vmshell meson setup -Dtest_system=true build src | |
vmshell meson compile -C build | |
- name: test | |
run: vmshell meson test --no-suite system -C build | |
- name: test_system | |
run: vmshell meson test --suite system -C build || true | |
- name: copy falure logs | |
if: always() | |
run: | | |
vmshell tar -cf - build/meson-logs | tar -xf - | |
- uses: actions/[email protected] | |
if: always() | |
with: | |
name: meson-logs-haiku | |
path: build/meson-logs | |
macos: | |
runs-on: macos-latest | |
steps: | |
- run: | | |
brew update | |
brew install meson samurai | |
- uses: actions/[email protected] | |
- name: build | |
run: | | |
meson setup -Db_sanitize=address,undefined -Dtest_system=true build | |
meson compile -C build | |
- name: test | |
run: meson test --no-suite system -C build | |
- name: test_system | |
run: meson test --suite system -C build || true | |
- uses: actions/[email protected] | |
if: always() | |
with: | |
name: meson-logs-macos | |
path: build/meson-logs | |
msys2: | |
runs-on: windows-latest | |
defaults: | |
run: | |
shell: msys2 {0} | |
strategy: | |
matrix: | |
sys: [mingw64, mingw32, ucrt64, clang64, clang32] | |
steps: | |
- uses: msys2/setup-msys2@v2 | |
with: | |
msystem: ${{matrix.sys}} | |
update: true | |
path-type: strict | |
install: pactoys | |
- name: setup | |
run: | | |
# Lines stolen from: | |
# https://github.com/msys2/MINGW-packages/blob/56dd3261b3e67c901e45f9314b671ea19104bc0e/.github/workflows/main.yml#L56-L63 | |
grep -qF '[clang32]' /etc/pacman.conf || sed -i \ | |
'1s|^|[clang32]\nInclude = /etc/pacman.d/mirrorlist.mingw\n|' \ | |
/etc/pacman.conf | |
pacman --noconfirm -Suuy | |
pacboy --noconfirm -S --needed clang:p meson:p ninja:p | |
- uses: actions/[email protected] | |
- name: build | |
run: | | |
meson setup -Dtest_system=true build | |
meson compile -C build | |
- name: test | |
run: meson test --no-suite system -C build | |
- name: test_system | |
run: meson test --suite system -C build || true | |
- uses: actions/[email protected] | |
if: always() | |
with: | |
name: meson-logs-${{matrix.sys}} | |
path: build/meson-logs | |
MSYS: | |
runs-on: windows-latest | |
defaults: | |
run: | |
shell: msys2 {0} | |
steps: | |
- uses: msys2/setup-msys2@v2 | |
with: | |
msystem: MSYS | |
path-type: strict | |
install: git gcc clang meson ninja | |
- uses: actions/[email protected] | |
- name: build | |
run: | | |
meson setup -Dtest_system=true build | |
meson compile -C build | |
- name: test | |
run: meson test --no-suite system -C build | |
- name: test_system | |
run: meson test --suite system -C build || true | |
- uses: actions/[email protected] | |
if: always() | |
with: | |
name: meson-logs-msys2 | |
path: build/meson-logs | |
netbsd: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/[email protected] | |
- name: test on NetBSD | |
uses: cross-platform-actions/[email protected] | |
with: | |
operating_system: netbsd | |
version: '9.2' | |
run: | | |
sudo pkgin -y install meson | |
meson setup -Dtest_system=true build | |
meson compile -C build | |
meson test --no-suite system -C build | |
meson test --suite system -C build || true | |
- uses: actions/[email protected] | |
if: always() | |
with: | |
name: meson-logs-netbsd | |
path: build/meson-logs | |
vs: | |
runs-on: windows-latest | |
strategy: | |
matrix: | |
cc: [clang, msvc] | |
api: [win32, uwp] | |
arch: [aarch64, amd64] | |
steps: | |
- uses: actions/[email protected] | |
- run: pip install meson | |
- uses: actions/[email protected] | |
- name: build | |
run: | | |
if ("${{matrix.api}}" -eq "uwp") { | |
$uwp = "--cross-file=.github/workflows/meson-vs-uwp.txt" | |
} | |
if ("${{matrix.arch}}" -eq "aarch64") { | |
$arm = "--cross-file=.github/workflows/meson-vs-aarch64.txt" | |
} | |
# Don't do debug builds because that triggers a Windows bug: | |
# https://developercommunity.visualstudio.com/t/_setmaxstdio-hangs-the-program-if-the/10164855?space=62&q=setmaxstdio&viewtype=all | |
meson setup $uwp $arm $build $asan --buildtype=release --backend=vs ` | |
--cross-file .github/workflows/meson-vs-${{matrix.cc}}.txt ` | |
-Dtest_system=true build | |
meson compile -C build | |
- name: test | |
run: meson test --no-suite system -C build | |
- name: test_system | |
run: meson test --suite system -C build || true | |
- uses: actions/[email protected] | |
if: always() | |
with: | |
name: meson-logs-vs-${{matrix.cc}}-${{matrix.api}}-${{matrix.arch}} | |
path: build/meson-logs |