Skip to content

Commit

Permalink
Add CI
Browse files Browse the repository at this point in the history
  • Loading branch information
pythops committed Feb 21, 2024
1 parent ce6486e commit 9d7158d
Show file tree
Hide file tree
Showing 2 changed files with 64 additions and 0 deletions.
29 changes: 29 additions & 0 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
---
name: CI
on:
pull_request:
push:
branches:
- "*"
jobs:
test:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: dtolnay/rust-toolchain@stable
with:
toolchain: stable
components: clippy rustfmt

- name: Setup the build env
run: |
sudo apt update
sudo apt install -y libdbus-1-dev pkg-config
- name: Linting
run: |
cargo clippy --workspace --all-features -- -D warnings
cargo fmt --all -- --check
- name: Debug builds
run: cargo build
35 changes: 35 additions & 0 deletions .github/workflows/release.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
---
name: Release
on:
push:
tags:
- "v*"
jobs:
build:
permissions:
contents: write
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: dtolnay/rust-toolchain@stable
with:
toolchain: stable

- name: Setup the build env
run: |
sudo apt update
sudo apt install -y libdbus-1-dev pkg-config
- name: Build for x86_64
run: |
cargo build --release
cp target/release/bluetui bluetui-x86_64-linux-gnu
- name: Release
uses: softprops/action-gh-release@v1
with:
body: |
[Release.md](${{ github.server_url }}/${{ github.repository }}/blob/master/Release.md)
files: "bluetui*"
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

0 comments on commit 9d7158d

Please sign in to comment.