Skip to content

Commit

Permalink
Merge pull request #5 from theavege/add/ci
Browse files Browse the repository at this point in the history
Add/ci
  • Loading branch information
pysrc authored Oct 14, 2024
2 parents 9ff74fd + 94bcd56 commit 0931df0
Show file tree
Hide file tree
Showing 4 changed files with 78 additions and 1 deletion.
11 changes: 11 additions & 0 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
---
version: 2
updates:
- package-ecosystem: "github-actions"
directory: "/"
schedule:
interval: "weekly"
- package-ecosystem: "cargo"
directory: "/"
schedule:
interval: "daily"
59 changes: 59 additions & 0 deletions .github/workflows/rust.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,59 @@
---
name: Build

on:
push:
branches:
- "**"
pull_request:
branches:
- master
schedule:
- cron: '30 13 * * *'

concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true

jobs:
build:
runs-on: ${{ matrix.os }}
timeout-minutes: 120
strategy:
matrix:
os:
- ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v2
- name: Build
working-directory: "."
shell: bash
run: |
function log
{
declare -rAi TAG=(
[error]=31
[info]=32
[audit]=33
)
printf '%(%y-%m-%d_%T)T\x1b[%dm\t%s:\t%b\x1b[0m\n' -1 "${TAG[${1,,:?}]}" "${1^^}" "${2:?}" 1>&2
if [[ ${1} == 'error' ]]; then
return 1
fi
}
export -f log
if [[ ${RUNNER_OS} == "Linux" ]]; then
log 'info' 'Download dep'
sudo apt-get update
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
log 'info' 'Cargo Clippy'
cargo clippy --quiet
log 'info' 'Cargo Build'
cargo build --quiet --release
fi > /dev/null
- name: Archive
uses: actions/upload-artifact@v4
with:
retention-days: 1
path: target/release/*
7 changes: 7 additions & 0 deletions Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,7 +1,14 @@
[workspace]
resolver = "2"

members = [
"dscom",
"dsserver",
"dsclient"
]

[profile.release]
strip = true
opt-level = "z"
lto = true
panic = "abort"
2 changes: 1 addition & 1 deletion dsclient/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -15,5 +15,5 @@ panic = "abort"
dscom = {path = "../dscom"}

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

0 comments on commit 0931df0

Please sign in to comment.