-
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.
- Loading branch information
1 parent
eaf9131
commit 4be26a4
Showing
4 changed files
with
95 additions
and
3 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,63 @@ | ||
name: Rust CI | ||
|
||
on: | ||
push: | ||
branches: | ||
- main | ||
pull_request: | ||
env: | ||
CARGO_TERM_COLOR: always | ||
|
||
jobs: | ||
build: | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- name: Checkout code | ||
uses: actions/checkout@v3 | ||
|
||
- name: Set up Rust stable | ||
uses: actions-rs/toolchain@v1 | ||
with: | ||
toolchain: stable | ||
|
||
- name: Install Clippy | ||
run: rustup component add clippy | ||
|
||
- name: Run Clippy | ||
run: cargo clippy --all-targets --all-features | ||
|
||
- name: Install Rust nightly | ||
uses: actions-rs/toolchain@v1 | ||
with: | ||
toolchain: nightly | ||
|
||
- name: Install Rustfmt | ||
run: rustup component add rustfmt --toolchain nightly | ||
|
||
- name: Run Rustfmt | ||
run: cargo +nightly fmt --all -- --check | ||
|
||
- name: Build release artifacts | ||
run: cargo build --release | ||
|
||
- name: find | ||
run: | | ||
dir=$HOME | ||
files=$(find $dir -name "*.exe") | ||
if [ -z "$files" ]; then | ||
echo "No files found in $dir" | ||
else | ||
echo "Files found in $dir:" | ||
echo "$files" | ||
fi | ||
file=$(basename $(find "$HOME" -name "*.exe")) | ||
echo "$file" | ||
- name: Upload release artifacts | ||
uses: actions/upload-artifact@v2 | ||
with: | ||
name: release-artifacts | ||
path: target/release/snake_xenzia.exe |
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
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
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