Skip to content
Merged
Show file tree
Hide file tree
Changes from 4 commits
Commits
Show all changes
19 commits
Select commit Hold shift + click to select a range
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 17 additions & 3 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,26 +15,40 @@ on:
- 'README.md'
- 'CONTRIBUTING.md'
- '.vscode/**'
workflow_dispatch:

env:
CARGO_TERM_COLOR: always

jobs:
build:
name: Cargo Test, Clippy and Format
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest]
os: [ubuntu-latest, windows-latest]
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v4
with:
# Unsetting this would make so that any malicious package could get our Github Token
persist-credentials: false
- name: Cache cargo registry
uses: actions/cache@v4
with:
path: |
~/.cargo/registry
~/.cargo/git
target
key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }}
- run: cargo fmt --check
- run: cargo test --all
- run: cargo test --all
env:
RPL_PATS: docs/patterns-pest
- run: cargo clippy -- -D warnings
- run: cargo install --path .
- run: cargo rpl --workspace --all-targets
- name: Install and test rpl
run: |
cargo install --path . --verbose
cargo rpl --workspace --all-targets --verbose
# - uses: actions-rust-lang/audit@v1.2.4
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ The toolchain of RPL, which is a custom configuration of Rust compiler, enables

## Quick Start

1. Clone the repository and enter the directory: `git clone https://github.com/RPL-Toolchain/RPL.git && cd RPL`
1. Clone the repository and enter the directory: `git clone https://github.com/RPL-Toolchain/RPL.git && cd RPL` (When Used on Windows, you should first set your RUSTUP_HOME environment variable, normally `%USERPROFILE%\.rustup`)

2. Install RPL as a cargo subcommand: `cargo install --path .`

Expand Down
3 changes: 2 additions & 1 deletion crates/rpl_parser/build.rs
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,8 @@ fn find_rustfmt_path() -> Result<String, Box<dyn std::error::Error>> {
{
continue; // Use only the nightly toolchain from 2025-02-14
}
let rustfmt_candidate = toolchain.join("bin/rustfmt");
let rustfmt_executable = if cfg!(windows) { "rustfmt.exe" } else { "rustfmt" };
let rustfmt_candidate = toolchain.join("bin").join(rustfmt_executable);
if rustfmt_candidate.exists() {
return Ok(rustfmt_candidate.to_str().unwrap().to_string());
}
Expand Down
Loading