Support RPM based distros #863
Workflow file for this run
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: Test | |
on: | |
workflow_dispatch: | |
push: | |
branches: [ 'dev', 'main' ] | |
pull_request: | |
branches: [main, master] | |
schedule: | |
- cron: '30 6 * * *' | |
jobs: | |
linux: | |
runs-on: ubuntu-latest | |
name: Linux | |
env: | |
RUST_BACKTRACE: 1 | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v3 | |
with: | |
fetch-depth: 10 | |
- name: Build rig | |
run: | | |
docker build -t rig:latest . | |
docker run --name quickrig rig:latest ls out | |
docker cp quickrig:out . | |
ls out | |
cp out/rig* . | |
- name: Upload build as artifact | |
uses: actions/upload-artifact@v3 | |
if: success() | |
with: | |
name: rig-linux | |
path: 'rig-*.tar.gz' | |
- name: Install rig | |
run: | | |
sudo tar xzf rig-*.tar.gz -C /usr/local | |
- name: Install bats | |
run: | | |
sudo apt-get update && sudo apt-get install bats | |
- name: Run tests | |
run: | | |
bats tests/test-linux.sh | |
linux-arm: | |
runs-on: [linux-arm64] | |
name: Linux-aaarch | |
env: | |
RUST_BACKTRACE: 1 | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v3 | |
with: | |
fetch-depth: 10 | |
- name: Build rig | |
run: | | |
docker system prune -f | |
docker build -t rig:latest . | |
docker rm quickrig 2>/dev/null || true | |
docker run --name quickrig rig:latest ls out | |
docker cp quickrig:out . | |
ls out | |
cp out/rig* . | |
- name: Upload build as artifact | |
uses: actions/upload-artifact@v3 | |
if: success() | |
with: | |
name: rig-linux-aarch64 | |
path: 'rig-*.tar.gz' | |
# TODO: run tests in Docker container | |
macos: | |
runs-on: ${{ matrix.config.os }} | |
name: ${{ matrix.config.os }} | |
env: | |
RUST_BACKTRACE: 1 | |
strategy: | |
fail-fast: false | |
matrix: | |
config: | |
- { os: macOS-11 } | |
- { os: macos-12 } | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v3 | |
with: | |
fetch-depth: 10 | |
- name: Install rust | |
run: | | |
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs -o rust.sh | |
sh rust.sh -y | |
- name: Build rig | |
run: | | |
cargo build --release | |
- name: Install rig | |
run: | | |
sudo cp target/release/rig /usr/local/bin/ | |
- name: Install bats | |
run: | | |
brew unlink bats || true | |
brew install bats-core | |
- name: Run tests | |
run: | | |
bats tests/test-macos.sh | |
windows: | |
runs-on: windows-latest | |
name: Windows | |
env: | |
RUST_BACKTRACE: 1 | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v3 | |
with: | |
fetch-depth: 10 | |
- name: Install rust | |
uses: actions-rs/toolchain@v1 | |
with: | |
toolchain: stable | |
- name: Install make | |
run: choco install make | |
- name: Install curl | |
run: choco install curl | |
- run: | | |
make win | |
shell: bash | |
- uses: actions/upload-artifact@v3 | |
if: success() | |
with: | |
name: rig-windows | |
path: 'rig-*.exe' | |
- name: Install rig | |
run: | | |
Start-Process .\rig-*.exe -ArgumentList "/verysilent /suppressmsgboxes" -Wait -NoNewWindow | |
- name: Install bats | |
run: | | |
npm install -g bats | |
- name: Run tests | |
run: | | |
bats tests/test-windows.sh | |
shell: bash |