Skip to content

Commit

Permalink
ci(actions): 📦️ add packaging stuff with Lintian
Browse files Browse the repository at this point in the history
  • Loading branch information
Jisu-Woniu committed Mar 18, 2024
1 parent df79a7c commit 23279fb
Show file tree
Hide file tree
Showing 6 changed files with 24 additions and 8 deletions.
4 changes: 3 additions & 1 deletion .github/workflows/testing.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,13 +25,15 @@ jobs:
- name: Install dependencies
run: |
sudo apt-get update && sudo apt-get upgrade -y && \
sudo apt-get install -y protobuf-compiler libprotobuf-dev lld
sudo apt-get install -y lld protobuf-compiler libprotobuf-dev lintian
- name: Run clippy lint
run: cargo hack clippy --all-targets --each-feature --workspace
- name: Run tests
run: cargo hack test --all-targets --each-feature --verbose --workspace
- name: Build Debian package
run: cargo xtask dist deb && dpkg-deb -c target/debian/*.deb
- name: Lint Debian package
run: lintian target/debian/*.deb
- uses: actions/upload-artifact@v4
with:
name: rsjudge-deb
Expand Down
1 change: 0 additions & 1 deletion Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

14 changes: 8 additions & 6 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ authors.workspace = true
edition = "2021"
license.workspace = true
rust-version.workspace = true
description = "An online judge sandbox server in Rust."
description = "online judge sandbox server in Rust"

[package.metadata.deb]
assets = [
Expand Down Expand Up @@ -63,14 +63,17 @@ assets = [
],
]
copyright = "2023-2024 NJUPT-SAST"
changelog = "debian/changelog"
features = ["default"]
conf-files = ["/etc/rsjudge/server.toml", "/etc/rsjudge/executors.toml"]
extended-description = "An online judge sandbox server in Rust, inspired by go-judge, for SAST OJ."
maintainer = "Xiaoqing Xuan <[email protected]>"
maintainer-scripts = "debian/"
depends = "$auto, libc6, libgcc-s1, libstdc++6, libssl1.1, libzstd1, libzstd-dev"
depends = "$auto, adduser, libc6, libgcc-s1, libstdc++6, libssl1.1, libzstd1, libzstd-dev"
recommends = "gcc, g++, python3"
suggests = "pypy3"
section = "net"
systemd-units = { enable = false }
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html

[dependencies]
# Workspace dependencies
Expand All @@ -86,14 +89,13 @@ caps = "0.5.5"
clap = { version = "4.5.3", features = ["derive"] }
env_logger = "0.11.3"
log = "0.4.21"
serde = { version = "1.0.197", features = ["derive"] }
tokio = { version = "1.36.0", features = ["fs", "rt-multi-thread", "macros"] }
toml = "0.8.11"
toml = "0.8.12"

# Unused for now:
# cgroups = "0.1.0"
# duct = "0.13.7"
# nix = { version = "0.27.1", features = ["fs"] }
# serde = { version = "1.0.197", features = ["derive"] }
# strfmt = "0.2.4"
# uzers = "0.11.3"

Expand Down
5 changes: 5 additions & 0 deletions debian/changelog
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
rsjudge (0.1.0-1) UNRELEASED; urgency=low

* Initial release

-- Xiaoqing Xuan <[email protected]> Tue, 19 Mar 2024 03:56:24 +0800
3 changes: 3 additions & 0 deletions debian/service
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
[Unit]
Description=RsJudge autostart service.
Documentation=man:rsjudge(1)
Wants=network-online.target
After=network-online.target

[Service]
ExecStart=/usr/bin/rsjudge --config /etc/rsjudge/
Expand Down
5 changes: 5 additions & 0 deletions debian/tmpfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
#Type Path Mode User Group Age Argument
d /var/lib/rsjudge-supervisor 0700 rsjudge-supervisor rsjudge-supervisor - -
d /var/log/rsjudge-supervisor 0755 rsjudge-supervisor rsjudge-supervisor - -
d /var/lib/rsjudge-builder 0700 rsjudge-builder rsjudge-builder - -
d /var/lib/rsjudge-runner 0700 rsjudge-runner rsjudge-runner - -

0 comments on commit 23279fb

Please sign in to comment.