Skip to content

Commit

Permalink
Merge pull request #2255 from lf-lang/fix-rust-action
Browse files Browse the repository at this point in the history
Fix rust setup action in CI
  • Loading branch information
cmnrd committed Apr 8, 2024
2 parents 205ed22 + edf41df commit 2179837
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 9 deletions.
5 changes: 3 additions & 2 deletions .github/workflows/lsp-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -51,10 +51,11 @@ jobs:
path: ~/.pnpm-store
key: ${{ runner.os }}-node${{ matrix.node-version }}-${{ hashFiles('core/src/main/resources/lib/ts/package.json') }}
- name: Setup Rust
uses: ATiltedTree/setup-rust@v1
uses: actions-rust-lang/setup-rust-toolchain@v1
with:
rust-version: nightly
toolchain: stable
components: clippy
rustflags: "" # don't use -D warnings
- name: Install Dependencies Ubuntu
run: |
sudo apt-get install libprotobuf-dev protobuf-compiler libprotobuf-c-dev protobuf-c-compiler
Expand Down
10 changes: 6 additions & 4 deletions .github/workflows/rs-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -50,20 +50,22 @@ jobs:
if: inputs.runtime-ref
- name: Setup Rust
id: rustup
uses: ATiltedTree/setup-rust@v1
uses: actions-rust-lang/setup-rust-toolchain@v1
with:
rust-version: ${{ matrix.rust }}
toolchain: ${{ matrix.rust }}
components: clippy
rustflags: "" # don't use -D warnings
continue-on-error: true
- name: Delete rustup cache
run: rm -r ~/.rustup
if: ${{ steps.rustup.outcome }} != "success"
- name: Setup Rust (again)
if: ${{ steps.rustup.outcome }} != "success"
uses: ATiltedTree/setup-rust@v1
uses: actions-rust-lang/setup-rust-toolchain@v1
with:
rust-version: ${{ matrix.rust }}
toolchain: ${{ matrix.rust }}
components: clippy
rustflags: "" # don't use -D warnings
- name: Run Rust tests
run: ./gradlew targetTest -Ptarget=Rust
- name: Report to CodeCov
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -67,8 +67,6 @@ ${" |"..gen.crate.modulesToIncludeInMain.joinWithLn { "mod ${it.fileName
|
|struct CliParseResult(SchedulerOptions, __MainParams, LevelFilter);
|
|const DEFAULT_LOG_LEVEL: LevelFilter = LevelFilter::Warn;
|
|fn main() {
| let CliParseResult(options, main_args, log_level) = cli::parse();
|
Expand Down Expand Up @@ -139,7 +137,7 @@ ${" | "..mainReactor.ctorParams.joinWithCommasLn { (it.default
| );
|
| let level_by_env = std::env::var("RUST_LOG").ok().and_then(|e| e.as_str().parse::<::log::LevelFilter>().ok());
| let log_level = level_by_env.unwrap_or(DEFAULT_LOG_LEVEL);
| let log_level = level_by_env.unwrap_or(LevelFilter::Warn);
|
| CliParseResult(options, main_args, log_level)
| }
Expand Down

0 comments on commit 2179837

Please sign in to comment.