Repository navigation
64 lines (59 loc) · 1.86 KB
/
Copy pathci.yml
File metadata and controls
64 lines (59 loc) · 1.86 KB
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
56
57
58
59
60
61
62
63
64
name: CI
on:
push:
branches: [main]
pull_request:
env:
CARGO_TERM_COLOR: always
RUSTFLAGS: -D warnings
jobs:
gate:
name: fmt, clippy, tests, licences
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: dtolnay/rust-toolchain@stable
with:
components: rustfmt, clippy
- uses: Swatinem/rust-cache@v2
- name: Install bubblewrap and git (the sandbox tests use them when present)
run: sudo apt-get update && sudo apt-get install -y bubblewrap git
- uses: taiki-e/install-action@cargo-deny
- name: The gate
run: ./scripts/check.sh
rpm:
name: Fedora rpm (dry run)
runs-on: ubuntu-latest
container: fedora:44
steps:
- uses: actions/checkout@v4
- name: Build tools
run: dnf install -y gcc rustup git rpm-build && rustup-init -y --profile minimal && echo "$HOME/.cargo/bin" >> "$GITHUB_PATH"
- uses: Swatinem/rust-cache@v2
- uses: taiki-e/install-action@v2
with:
tool: cargo-generate-rpm
- run: cargo build --release
- run: cargo generate-rpm -p crates/app && mkdir -p dist && cp target/generate-rpm/*.rpm dist/
- run: rpm -qpi dist/*.rpm && rpm -qpl dist/*.rpm
- uses: actions/upload-artifact@v4
with:
name: rpm
path: dist/*.rpm
deb:
name: Debian deb (built on an old glibc)
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v4
- uses: dtolnay/rust-toolchain@stable
- uses: Swatinem/rust-cache@v2
- uses: taiki-e/install-action@v2
with:
tool: cargo-deb
- run: cargo build --release
- run: cargo deb -p re-code --no-build -o dist/
- run: dpkg-deb --info dist/*.deb && dpkg-deb --contents dist/*.deb
- uses: actions/upload-artifact@v4
with:
name: deb
path: dist/*.deb