Skip to content

Commit 0931df0

Browse files
authored
Merge pull request #5 from theavege/add/ci
Add/ci
2 parents 9ff74fd + 94bcd56 commit 0931df0

File tree

4 files changed

+78
-1
lines changed

4 files changed

+78
-1
lines changed

.github/dependabot.yml

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
---
2+
version: 2
3+
updates:
4+
- package-ecosystem: "github-actions"
5+
directory: "/"
6+
schedule:
7+
interval: "weekly"
8+
- package-ecosystem: "cargo"
9+
directory: "/"
10+
schedule:
11+
interval: "daily"

.github/workflows/rust.yml

Lines changed: 59 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,59 @@
1+
---
2+
name: Build
3+
4+
on:
5+
push:
6+
branches:
7+
- "**"
8+
pull_request:
9+
branches:
10+
- master
11+
schedule:
12+
- cron: '30 13 * * *'
13+
14+
concurrency:
15+
group: ${{ github.workflow }}-${{ github.ref }}
16+
cancel-in-progress: true
17+
18+
jobs:
19+
build:
20+
runs-on: ${{ matrix.os }}
21+
timeout-minutes: 120
22+
strategy:
23+
matrix:
24+
os:
25+
- ubuntu-latest
26+
steps:
27+
- name: Checkout
28+
uses: actions/checkout@v2
29+
- name: Build
30+
working-directory: "."
31+
shell: bash
32+
run: |
33+
function log
34+
{
35+
declare -rAi TAG=(
36+
[error]=31
37+
[info]=32
38+
[audit]=33
39+
)
40+
printf '%(%y-%m-%d_%T)T\x1b[%dm\t%s:\t%b\x1b[0m\n' -1 "${TAG[${1,,:?}]}" "${1^^}" "${2:?}" 1>&2
41+
if [[ ${1} == 'error' ]]; then
42+
return 1
43+
fi
44+
}
45+
export -f log
46+
if [[ ${RUNNER_OS} == "Linux" ]]; then
47+
log 'info' 'Download dep'
48+
sudo apt-get update
49+
sudo apt-get install -y ninja-build lib{x11,xext,xft,xinerama,xcursor,xrender,xfixes,pango1.0,gl1-mesa,glu1-mesa,xdo,xcb-randr0}-dev
50+
log 'info' 'Cargo Clippy'
51+
cargo clippy --quiet
52+
log 'info' 'Cargo Build'
53+
cargo build --quiet --release
54+
fi > /dev/null
55+
- name: Archive
56+
uses: actions/upload-artifact@v4
57+
with:
58+
retention-days: 1
59+
path: target/release/*

Cargo.toml

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,14 @@
11
[workspace]
2+
resolver = "2"
23

34
members = [
45
"dscom",
56
"dsserver",
67
"dsclient"
78
]
9+
10+
[profile.release]
11+
strip = true
12+
opt-level = "z"
13+
lto = true
14+
panic = "abort"

dsclient/Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,5 +15,5 @@ panic = "abort"
1515
dscom = {path = "../dscom"}
1616

1717
flate2 = "1.0"
18-
fltk = { version = "^1.3", git = "https://github.com/fltk-rs/fltk-rs" }
18+
fltk = { version = "1.4.34", features = ["use-ninja"] }
1919
rayon = "1.5"

0 commit comments

Comments
 (0)