Files
dotwryn/.circleci/config.yml
T

90 lines
2.7 KiB
YAML
Raw Normal View History

---
version: 2.1
jobs:
2026-09-21 06:48:49 -06:00
test-setup:
parameters:
image:
type: string
# alpine has no supported installer, so setup can only *verify*
# dependencies there; unresolved ones are expected, not a failure
strict:
type: string
default: '--strict'
docker:
- image: << parameters.image >>
steps:
- run:
name: install test prerequisites
command: |
if command -v pacman >/dev/null 2>&1
then pacman -Syu --noconfirm --needed git zsh sudo openssh tar gzip
elif command -v dnf >/dev/null 2>&1
then dnf install -y git zsh sudo openssh-clients tar gzip
elif command -v apt-get >/dev/null 2>&1
then apt-get update && apt-get install -y git zsh sudo openssh-client ca-certificates tar gzip
elif command -v apk >/dev/null 2>&1
then apk add --no-cache git zsh sudo openssh-client shadow tar
fi
- checkout
- run:
name: run setup as an unprivileged user
command: |
useradd -m tester 2>/dev/null || adduser -D tester
echo 'tester ALL=(ALL) NOPASSWD: ALL' > /etc/sudoers.d/tester
TESTER_HOME="$(getent passwd tester | cut -d: -f6)"
cp -a . "${TESTER_HOME}/.wryn"
chown -R tester "${TESTER_HOME}/.wryn"
# a LOGIN shell, so /etc/profile contributes to PATH exactly as
# it would in a real session (debian puts /usr/games there)
su - tester -c "cd ~/.wryn && ./setup/run \
--only packages \
--min \
--ci \
<< parameters.strict >> \
--no-logfile \
"
deploy:
docker:
2022-10-01 13:03:44 -06:00
- image: docker:git
steps:
- checkout
2022-10-01 13:08:03 -06:00
- setup_remote_docker
- run: docker build . -t blaziken734/debugger -f .docker/Dockerfile
- run: echo $DOCKER_PASS | docker login -u $DOCKER_USER --password-stdin
- run: docker push blaziken734/debugger
workflows:
version: 2
main:
jobs:
2026-09-21 06:48:49 -06:00
- test-setup:
name: test-arch
image: archlinux:base-devel
- test-setup:
name: test-fedora
image: fedora:latest
- test-setup:
name: test-debian
image: debian:stable
- test-setup:
name: test-alpine
image: alpine:latest
strict: ''
- deploy:
2026-09-21 06:48:49 -06:00
requires:
- test-arch
- test-fedora
- test-debian
- test-alpine
context:
- yage-docker
filters:
branches:
only:
- main