-
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.
Merge pull request #24 from Xila-Project/Continuous_integration
Continuous integration
- Loading branch information
Showing
4 changed files
with
48 additions
and
19 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 |
---|---|---|
@@ -1,4 +1,4 @@ | ||
name: Continuous Integration | ||
name: Continuous integration | ||
|
||
on: | ||
push: | ||
|
@@ -11,31 +11,52 @@ env: | |
CARGO_TERM_COLOR: always | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
|
||
|
||
jobs: | ||
rust-checks: | ||
name: Rust Checks | ||
name: Rust checks | ||
runs-on: ubuntu-latest | ||
strategy: | ||
fail-fast: false | ||
matrix: | ||
action: | ||
- command: build | ||
args: --release | ||
- command: fmt | ||
args: --all -- --check --color always | ||
- command: clippy | ||
args: --all-targets --all-features --workspace -- -D warnings | ||
- command: test | ||
target: | ||
- linux | ||
- esp32 | ||
- esp32s3 | ||
|
||
steps: | ||
- name: Checkout repository | ||
uses: actions/checkout@v4 | ||
|
||
- name: Enable caching | ||
uses: Swatinem/rust-cache@v2 | ||
- name: Setup Rust | ||
with: | ||
key: "${{ matrix.target }}" | ||
|
||
- name: Setup stable rust toolchain | ||
uses: dtolnay/rust-toolchain@stable | ||
with: | ||
components: rustfmt, clippy | ||
target: wasm32-unknown-unknown | ||
|
||
- name: Setup ESP rust toolchain | ||
uses: esp-rs/[email protected] | ||
with: | ||
default: true | ||
buildtargets: esp32s3 | ||
buildtargets: esp32,esp32s3 | ||
ldproxy: true | ||
- name: Run command | ||
run: cargo ${{ matrix.action.command }} ${{ matrix.action.args }} | ||
|
||
- name: Install necessary dependencies | ||
run: sudo apt-get install -y libsdl2-dev | ||
|
||
- name: Build and enable build tool | ||
run: source Export.sh | ||
|
||
- name: Check formatting | ||
run: Build_tool/target/release/Build_tool format --all -- --check --color always | ||
|
||
- name: Check clippy | ||
run: Build_tool/target/release/Build_tool clippy ${{ matrix.target }} --all-features --workspace -- -D warnings | ||
|
||
- name: Run tests | ||
run: Build_tool/target/release/Build_tool test ${{ matrix.target }} --all -- --include-ignored |
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