Attempt to run tests on macOS #73
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
name: Main | |
on: | |
workflow_dispatch: | |
push: | |
branches: [ "main" ] | |
pull_request: | |
branches: [ "main" ] | |
env: | |
CARGO_TERM_COLOR: always | |
RUST_BACKTRACE: 1 | |
jobs: | |
mac-build: | |
runs-on: macos-14 | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Set up Homebrew | |
id: set-up-homebrew | |
uses: Homebrew/actions/setup-homebrew@master | |
- name: Install Podman | |
run: brew install podman | |
- name: Start Podman | |
run: | | |
podman machine init | |
podman machine start | |
- name: Build | |
run: cargo build --verbose | |
- name: Tests | |
run: cargo test --verbose | |
build: | |
runs-on: ubuntu-24.04 | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Remove Default Podman | |
run: | | |
sudo apt-get remove podman | |
- uses: actions/checkout@v4 | |
with: | |
repository: containers/podman | |
ref: v5.1.2 | |
path: ./podman | |
- name: Build Podman | |
run: | | |
sudo apt-get install \ | |
btrfs-progs \ | |
golang-go \ | |
go-md2man \ | |
iptables \ | |
libassuan-dev \ | |
libbtrfs-dev \ | |
libc6-dev \ | |
libdevmapper-dev \ | |
libglib2.0-dev \ | |
libgpgme-dev \ | |
libgpg-error-dev \ | |
libprotobuf-dev \ | |
libprotobuf-c-dev \ | |
libseccomp-dev \ | |
libselinux1-dev \ | |
libsystemd-dev \ | |
pkg-config \ | |
uidmap | |
cd podman | |
make BUILDTAGS="systemd seccomp" PREFIX=/usr | |
sudo make install PREFIX=/usr | |
- name: Start Podman | |
run: | | |
podman --version | |
systemctl --user enable --now podman.socket | |
systemctl --user status podman.socket | |
- uses: dtolnay/rust-toolchain@stable | |
with: | |
components: rustfmt | |
- uses: taiki-e/install-action@v2 | |
with: | |
tool: cargo-rdme | |
- name: Format | |
run: cargo fmt --check | |
- name: README sync | |
run: cargo rdme --check --heading-base-level 0 | |
- name: Build | |
run: cargo build --verbose | |
- name: Tests | |
run: cargo test --verbose |