fix & test on vanilla linux distros (#2)
* fix & test on vanilla linux distros * add alpine and opensuse * merge * and void of course * cleanup the logs * need bash
This commit is contained in:
66
.github/workflows/test.yml
vendored
66
.github/workflows/test.yml
vendored
@@ -1,4 +1,4 @@
|
||||
name: test
|
||||
name: ./test.sh
|
||||
|
||||
on:
|
||||
push:
|
||||
@@ -7,21 +7,67 @@ on:
|
||||
|
||||
jobs:
|
||||
test:
|
||||
name: ./test.sh
|
||||
name: ${{ matrix.image || matrix.os }}
|
||||
runs-on: ${{ matrix.runs-on }}
|
||||
strategy:
|
||||
fail-fast: false
|
||||
matrix:
|
||||
include:
|
||||
- os: ubuntu-latest
|
||||
arch: x86_64
|
||||
- os: ubuntu-latest
|
||||
arch: aarch64
|
||||
# native (no docker)
|
||||
- os: macos-latest
|
||||
arch: arm64
|
||||
runs-on: ${{ matrix.arch == 'aarch64' && 'ubuntu-24.04-arm' || matrix.os }}
|
||||
runs-on: macos-latest
|
||||
|
||||
# the provided github actions runner images
|
||||
# have tons of pre-installed packages. the
|
||||
# goal here is to test across many vanilla setups
|
||||
- image: debian:bookworm-slim
|
||||
runs-on: ubuntu-latest
|
||||
- image: ubuntu:24.04
|
||||
runs-on: ubuntu-latest
|
||||
- image: fedora:41
|
||||
runs-on: ubuntu-latest
|
||||
- image: archlinux:latest
|
||||
runs-on: ubuntu-latest
|
||||
- image: alpine:3.21 # musl libc
|
||||
runs-on: ubuntu-latest
|
||||
- image: opensuse/tumbleweed:latest
|
||||
runs-on: ubuntu-latest
|
||||
- image: ghcr.io/void-linux/void-glibc:latest
|
||||
runs-on: ubuntu-latest
|
||||
- image: debian:bookworm-slim
|
||||
runs-on: ubuntu-24.04-arm
|
||||
steps:
|
||||
- uses: actions/checkout@v6
|
||||
- uses: actions/setup-python@v6
|
||||
|
||||
# native (macOS)
|
||||
- if: ${{ !matrix.image }}
|
||||
uses: actions/setup-python@v6
|
||||
with:
|
||||
python-version: "3.14"
|
||||
- run: ./test.sh
|
||||
- if: ${{ !matrix.image }}
|
||||
name: ./test.sh
|
||||
run: ./test.sh
|
||||
|
||||
# docker (vanilla Linux)
|
||||
- if: ${{ matrix.image }}
|
||||
name: install python3
|
||||
run: |
|
||||
docker build -t test -f - . <<'DOCKERFILE'
|
||||
FROM ${{ matrix.image }}
|
||||
RUN if command -v apk >/dev/null; then \
|
||||
apk add --no-cache python3 py3-pip bash curl; \
|
||||
elif command -v apt-get >/dev/null; then \
|
||||
apt-get update && apt-get install -y --no-install-recommends python3 python3-pip python3-venv curl ca-certificates; \
|
||||
elif command -v dnf >/dev/null; then \
|
||||
dnf install -y python3 python3-pip curl; \
|
||||
elif command -v pacman >/dev/null; then \
|
||||
pacman -Sy --noconfirm python python-pip curl; \
|
||||
elif command -v zypper >/dev/null; then \
|
||||
zypper install -y python3 python3-pip curl; \
|
||||
elif command -v xbps-install >/dev/null; then \
|
||||
xbps-install -Sy python3 python3-pip bash curl; \
|
||||
fi
|
||||
DOCKERFILE
|
||||
- if: ${{ matrix.image }}
|
||||
name: ./test.sh
|
||||
run: docker run --rm -v "$PWD:/work" -w /work test bash ./test.sh
|
||||
|
||||
Reference in New Issue
Block a user