-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* feat: add just and ci * fix: lint * fix(alsa-error): install libasound2-dev --------- Co-authored-by: tomyrd <[email protected]> Co-authored-by: Tomas Rodriguez Dala <[email protected]>
- Loading branch information
1 parent
1e15d5d
commit 9d638a0
Showing
4 changed files
with
102 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
name: Build Rust Project | ||
|
||
on: | ||
push: | ||
tags: | ||
- "v*.*.*" | ||
|
||
env: | ||
CARGO_TERM_COLOR: always | ||
|
||
jobs: | ||
build-and-upload: | ||
name: Build and upload | ||
strategy: | ||
matrix: | ||
os: [ubuntu-latest, macos-latest] | ||
runs-on: ${{ matrix.os }} | ||
steps: | ||
- name: Checkout | ||
uses: actions/[email protected] | ||
- name: Use the rust-toolchain | ||
uses: actions-rust-lang/setup-rust-toolchain@v1 | ||
- name: Install just | ||
uses: extractions/setup-just@v1 | ||
- run: echo "WORKING_DIR=$(basename $(pwd))" >> $GITHUB_ENV | ||
- name: Install Dependencies | ||
if: ${{ matrix.os }} == 'ubuntu-latest' | ||
run: sudo apt-get install g++ pkg-config libx11-dev libasound2-dev libudev-dev libxkbcommon-x11-0 | ||
- name: Build | ||
shell: bash | ||
run: | | ||
just build-release | ||
echo "${{ env.WORKING_DIR }}" | ||
mv "target/release/${{ env.WORKING_DIR }}" "${{ matrix.os }}.bin" | ||
- name: Release | ||
uses: softprops/action-gh-release@v2 | ||
with: | ||
files: ${{ matrix.os }}.bin |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
name: cargo fmt, clippy and test on PR | ||
|
||
on: | ||
pull_request: | ||
|
||
env: | ||
CARGO_TERM_COLOR: always | ||
|
||
jobs: | ||
check: | ||
name: check fmt and clippy | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout | ||
uses: actions/[email protected] | ||
- name: Use the rust-toolchain | ||
uses: actions-rust-lang/setup-rust-toolchain@v1 | ||
- name: Install dependencies | ||
shell: bash | ||
run: | | ||
sudo apt-get install g++ pkg-config libx11-dev libasound2-dev libudev-dev libxkbcommon-x11-0 | ||
- name: Check fmt | ||
uses: actions-rust-lang/rustfmt@v1 | ||
- name: Check clippy | ||
run: cargo clippy | ||
- name: Check test | ||
run: cargo test --all-features |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
# Bevy HandsOn | ||
|
||
> [!NOTE] | ||
> WIP | ||
## Justfile | ||
|
||
Using `just` instead of `make`. | ||
|
||
After installation, the project can be built just by running `just`. | ||
|
||
- [Packages](https://github.com/casey/just?tab=readme-ov-file#packages) | ||
- Ubuntu → `apt install just` | ||
- MacOs → `brew install just` | ||
- [Editor Support](https://github.com/casey/just?tab=readme-ov-file#editor-support) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
default: lint build-debug test | ||
|
||
build-release: | ||
cargo build --release | ||
alias br := build-release | ||
|
||
build-debug: | ||
cargo build | ||
alias bd := build-debug | ||
|
||
test: | ||
cargo test | ||
alias t := test | ||
|
||
lint: | ||
cargo clippy | ||
alias l := lint | ||
|
||
[positional-arguments] | ||
@git_tag *args='': | ||
git tag $1 -f | ||
git push --tags -f |