-
Notifications
You must be signed in to change notification settings - Fork 0
55 lines (54 loc) · 2.19 KB
/
function-cli.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
name: "Function: CLI"
on:
push:
branches:
- "mistress"
paths:
- "**.rs"
- "**.yaml"
- "**.toml"
pull_request:
branches:
- "mistress"
paths:
- "**.rs"
- "**.yaml"
- "**.toml"
jobs:
function-cli:
runs-on: "ubuntu-latest"
steps:
- uses: "actions/checkout@v2"
- name: "Install latest stable Rust"
uses: "actions-rs/toolchain@v1"
with:
toolchain: "stable"
profile: "minimal"
target: "x86_64-unknown-linux-musl"
- uses: "Swatinem/rust-cache@v2"
with:
key: "cli-functionality"
cache-on-failure: true
- name: "Install musl-tools"
run: "sudo apt-get update && sudo apt-get install -y musl-tools comerr-dev wget"
- name: "Build release binary!"
uses: "actions-rs/cargo@v1"
with:
command: "build"
args: "--release --target=x86_64-unknown-linux-musl"
- name: "Run release binary"
run: "env RUST_LOG=debug ./target/x86_64-unknown-linux-musl/release/peckish -c ./peckish.ci.yaml"
- name: "Validate release binary"
run: "file release/peckish | grep -q 'ELF 64-bit LSB pie executable, x86-64'"
- name: "Validate Arch package"
run: 'docker run --rm -i -v "$(pwd)/release/peckish.arch.pkg.tar:/app/peckish.pkg.tar" archlinux:latest sh -c "pacman --noconfirm -U /app/peckish.pkg.tar && peckish --version"'
- name: "Validate Debian package on Debian"
run: 'docker run --rm -i -v "$(pwd)/release/peckish.deb:/app/peckish.deb" debian:latest sh -c "dpkg -i /app/peckish.deb && peckish --version"'
- name: "Validate Debian package on Ubuntu"
run: 'docker run --rm -i -v "$(pwd)/release/peckish.deb:/app/peckish.deb" ubuntu:latest sh -c "dpkg -i /app/peckish.deb && peckish --version"'
- name: "Validate tarball"
run: "tar t -vf ./release/peckish.tar"
- name: "Validate Docker image"
run: "docker run --rm queer/peckish:latest peckish --version"
- name: "Validate RPM package on Fedora"
run: 'docker run --rm -i -v "$(pwd)/release/peckish.rpm:/app/peckish.rpm" fedora:latest sh -c "rpm -i /app/peckish.rpm && peckish --version"'