CMD arg for specify where Zork++ start it's job from any place #110
Workflow file for this run
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
name: Code quality and sanity | ||
on: | ||
push: | ||
branches: '*' | ||
pull_request: | ||
branches: '*' | ||
jobs: | ||
clippy: | ||
name: Lint with Clippy | ||
runs-on: ubuntu-latest | ||
env: | ||
RUSTFLAGS: -Dwarnings | ||
steps: | ||
- uses: actions/checkout@v3 | ||
- name: Caching project dependencies | ||
id: project-cache | ||
uses: Swatinem/rust-cache@v2 | ||
- uses: hecrj/setup-rust-action@v1 | ||
with: | ||
components: clippy | ||
- name: Verifiying the code quality with Clippy | ||
run: | | ||
cd zork++ | ||
cargo clippy --all-targets --all-features | ||
rustfmt: | ||
name: Verify code formatting | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v3 | ||
- name: Caching project dependencies | ||
id: project-cache | ||
uses: Swatinem/rust-cache@v2 | ||
- uses: hecrj/setup-rust-action@v1 | ||
with: | ||
components: rustfmt | ||
- name: Checking the format sanity of the project | ||
run: | | ||
cd zork++ | ||
cargo fmt --all -- --check | ||
tests: | ||
name: Run the tests for the projects | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v3 | ||
- name: Caching project dependencies | ||
id: project-cache | ||
uses: Swatinem/rust-cache@v2 | ||
- name: Get the latest Clang version available | ||
run: | | ||
set -e # Exit on error | ||
# echo "removing the clang installed version for the VM" | ||
# sudo apt remove clang | ||
echo "updating the system packages" | ||
sudo apt update | ||
echo "upgrading the system packages" | ||
sudo apt update | ||
# echo "installing clang" | ||
# sudo apt install clang --install-suggests | ||
which_clangpp_path=$(which clang++) | ||
which_clangpp_version=$(clang++ --version) | ||
echo "clang++ location: $which_clangpp_path" | ||
echo "clang++ version: $which_clangpp_version" | ||
- name: Running the tests for the project | ||
if: success() || failure() | ||
run: | | ||
cd zork++ | ||
cargo test --color=always --all -- --show-output --nocapture --test-threads=1 |