Skip to content

Commit

Permalink
Fix workflow (#18)
Browse files Browse the repository at this point in the history
* Use checkout@v4

* Don't use cargo@v1

* Don't use toolchain@v1
  • Loading branch information
OlivierHecart authored Dec 19, 2023
1 parent 60d364c commit e10d4b4
Show file tree
Hide file tree
Showing 5 changed files with 44 additions and 41 deletions.
11 changes: 5 additions & 6 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ jobs:
os: [ ubuntu-latest, macOS-latest ]

steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4

- uses: actions/setup-java@v3
with:
Expand All @@ -39,11 +39,10 @@ jobs:
add-to-path: false
link-to-sdk: true

- name: Install Rust
uses: actions-rs/toolchain@v1
with:
override: true
components: rustfmt, clippy
- name: Install Rust toolchain
run: |
rustup show
rustup component add rustfmt clippy
- name: Cargo Format
working-directory: zenoh-jni
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/documentation.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ jobs:
name: Build and Deploy Documentation
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4

- uses: nttld/setup-ndk@v1
id: setup-ndk
Expand Down
11 changes: 5 additions & 6 deletions .github/workflows/publish_android.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ jobs:
contents: read
packages: write
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4

- uses: actions/setup-java@v3
with:
Expand All @@ -30,11 +30,10 @@ jobs:
add-to-path: false
link-to-sdk: true

- name: Install Rust
uses: actions-rs/toolchain@v1
with:
override: true
components: rustfmt, clippy
- name: Install Rust toolchain
run: |
rustup show
rustup component add rustfmt clippy
- name: Setup Rust toolchains
run: |
Expand Down
50 changes: 28 additions & 22 deletions .github/workflows/publish_jvm.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,28 +19,36 @@ jobs:
matrix:
job:
# In order to load any added target at runtime, editing the Zenoh class under jvmMain is required.
- { target: x86_64-unknown-linux-gnu,
- {
target: x86_64-unknown-linux-gnu,
arch: amd64,
os: ubuntu-20.04
}
os: ubuntu-20.04,
build-cmd: "cargo",
}
- {
target: aarch64-unknown-linux-gnu,
arch: arm64,
os: ubuntu-20.04,
build-cmd: "cross",
}
- {
target: aarch64-unknown-linux-gnu,
arch: arm64,
os: ubuntu-20.04,
use-cross: true,
}
- { target: x86_64-apple-darwin,
target: x86_64-apple-darwin,
arch: darwin,
os: macos-latest
}
- { target: aarch64-apple-darwin,
os: macos-latest,
build-cmd: "cargo",
}
- {
target: aarch64-apple-darwin,
arch: darwin,
os: macos-latest
}
- { target: x86_64-pc-windows-msvc,
os: macos-latest,
build-cmd: "cargo",
}
- {
target: x86_64-pc-windows-msvc,
arch: win64,
os: windows-2019
}
os: windows-2019,
build-cmd: "cargo",
}
steps:
- name: Checkout source code
uses: actions/checkout@v4
Expand All @@ -59,17 +67,15 @@ jobs:
;;
esac
cargo install cross --git https://github.com/cross-rs/cross
- name: Install Rust toolchain
run: |
rustup show
rustup target add ${{ matrix.job.target }}
- name: Build
uses: actions-rs/cargo@v1
with:
use-cross: ${{ matrix.job.use-cross }}
command: build
args: --release --bins --lib --features=${{ github.event.inputs.features}} --target=${{ matrix.job.target }} --manifest-path zenoh-jni/Cargo.toml
run: ${{ matrix.job.build-cmd }} build --release --bins --lib --features=${{ github.event.inputs.features}} --target=${{ matrix.job.target }} --manifest-path zenoh-jni/Cargo.toml

- name: Packaging
id: package
Expand Down
11 changes: 5 additions & 6 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ jobs:
os: [ ubuntu-latest, macOS-latest ]

steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4

- uses: actions/setup-java@v3
with:
Expand All @@ -34,11 +34,10 @@ jobs:
add-to-path: false
link-to-sdk: true

- name: Install Rust
uses: actions-rs/toolchain@v1
with:
override: true
components: rustfmt, clippy
- name: Install Rust toolchain
run: |
rustup show
rustup component add rustfmt clippy
- name: Cargo Format
working-directory: zenoh-jni
Expand Down

0 comments on commit e10d4b4

Please sign in to comment.