Skip to content

Commit

Permalink
Fix CI.
Browse files Browse the repository at this point in the history
  • Loading branch information
Dirbaio committed Mar 18, 2024
1 parent ca8cd2b commit 121edbb
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 35 deletions.
41 changes: 8 additions & 33 deletions .github/workflows/rust.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,45 +2,20 @@ name: Rust

on:
push:
branches: [ master, wip/* ]
branches: [ main ]
pull_request:
branches: [ master ]
branches: [ main ]
merge_group:

env:
CARGO_TERM_COLOR: always

jobs:
build:
name: Ubuntu Latest
runs-on: ubuntu-latest
steps:

- uses: actions/checkout@v2

- name: Cache Java SDKs
id: cache-java-sdks
uses: actions/cache@v2
with:
path: |
~/android-sdk-tmp/
~/.gradle/wrapper/
key: ${{ runner.os }}-java-sdks

- name: Install APT packages
run: sudo apt-get install -y openjdk-8-jdk unzip

- name: Info
run: |
rustc -V
cargo -V
- name: Build Install Test
# Modern Java has trouble with sdkmanager: https://stackoverflow.com/questions/46402772/failed-to-install-android-sdk-java-lang-noclassdeffounderror-javax-xml-bind-a
run: |
export JAVA_HOME=/usr/lib/jvm/java-8-openjdk-amd64/jre/
pushd scripts
chmod 755 ./install.sh
chmod 755 ./test.sh
./install.sh
./test.sh
popd
- uses: actions/checkout@v3
- name: Check fmt
run: cargo fmt -- --check
- name: Test
run: cargo test
4 changes: 2 additions & 2 deletions java-spaghetti/src/refs/local.rs
Original file line number Diff line number Diff line change
Expand Up @@ -13,13 +13,13 @@ use crate::{Env, Global, Ref, ReferenceType};
/// argument to each and every one. Since this is limited to the current thread/stack, these cannot be sanely stored
/// in any kind of static storage, nor shared between threads - instead use a [Global] if you need to do either.
///
/// Will DeleteLocalRef when dropped, invalidating the jobject but ensuring threads that rarely or never return to
/// Will `DeleteLocalRef` when dropped, invalidating the jobject but ensuring threads that rarely or never return to
/// Java may run without being guaranteed to eventually exhaust their local reference limit. If this is not desired,
/// convert to a plain Ref with:
///
/// ```rust,no_run
/// # use java_spaghetti::*;
/// # fn example<T: Class>(local: Local<T>) {
/// # fn example<T: ReferenceType>(local: Local<T>) {
/// let local = Local::leak(local);
/// # }
/// ```
Expand Down

0 comments on commit 121edbb

Please sign in to comment.