Skip to content

Commit e10d4b4

Browse files
Fix workflow (#18)
* Use checkout@v4 * Don't use cargo@v1 * Don't use toolchain@v1
1 parent 60d364c commit e10d4b4

File tree

5 files changed

+44
-41
lines changed

5 files changed

+44
-41
lines changed

.github/workflows/ci.yml

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ jobs:
2525
os: [ ubuntu-latest, macOS-latest ]
2626

2727
steps:
28-
- uses: actions/checkout@v3
28+
- uses: actions/checkout@v4
2929

3030
- uses: actions/setup-java@v3
3131
with:
@@ -39,11 +39,10 @@ jobs:
3939
add-to-path: false
4040
link-to-sdk: true
4141

42-
- name: Install Rust
43-
uses: actions-rs/toolchain@v1
44-
with:
45-
override: true
46-
components: rustfmt, clippy
42+
- name: Install Rust toolchain
43+
run: |
44+
rustup show
45+
rustup component add rustfmt clippy
4746
4847
- name: Cargo Format
4948
working-directory: zenoh-jni

.github/workflows/documentation.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ jobs:
1313
name: Build and Deploy Documentation
1414
runs-on: ubuntu-latest
1515
steps:
16-
- uses: actions/checkout@v3
16+
- uses: actions/checkout@v4
1717

1818
- uses: nttld/setup-ndk@v1
1919
id: setup-ndk

.github/workflows/publish_android.yml

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ jobs:
1616
contents: read
1717
packages: write
1818
steps:
19-
- uses: actions/checkout@v3
19+
- uses: actions/checkout@v4
2020

2121
- uses: actions/setup-java@v3
2222
with:
@@ -30,11 +30,10 @@ jobs:
3030
add-to-path: false
3131
link-to-sdk: true
3232

33-
- name: Install Rust
34-
uses: actions-rs/toolchain@v1
35-
with:
36-
override: true
37-
components: rustfmt, clippy
33+
- name: Install Rust toolchain
34+
run: |
35+
rustup show
36+
rustup component add rustfmt clippy
3837
3938
- name: Setup Rust toolchains
4039
run: |

.github/workflows/publish_jvm.yml

Lines changed: 28 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -19,28 +19,36 @@ jobs:
1919
matrix:
2020
job:
2121
# In order to load any added target at runtime, editing the Zenoh class under jvmMain is required.
22-
- { target: x86_64-unknown-linux-gnu,
22+
- {
23+
target: x86_64-unknown-linux-gnu,
2324
arch: amd64,
24-
os: ubuntu-20.04
25-
}
25+
os: ubuntu-20.04,
26+
build-cmd: "cargo",
27+
}
28+
- {
29+
target: aarch64-unknown-linux-gnu,
30+
arch: arm64,
31+
os: ubuntu-20.04,
32+
build-cmd: "cross",
33+
}
2634
- {
27-
target: aarch64-unknown-linux-gnu,
28-
arch: arm64,
29-
os: ubuntu-20.04,
30-
use-cross: true,
31-
}
32-
- { target: x86_64-apple-darwin,
35+
target: x86_64-apple-darwin,
3336
arch: darwin,
34-
os: macos-latest
35-
}
36-
- { target: aarch64-apple-darwin,
37+
os: macos-latest,
38+
build-cmd: "cargo",
39+
}
40+
- {
41+
target: aarch64-apple-darwin,
3742
arch: darwin,
38-
os: macos-latest
39-
}
40-
- { target: x86_64-pc-windows-msvc,
43+
os: macos-latest,
44+
build-cmd: "cargo",
45+
}
46+
- {
47+
target: x86_64-pc-windows-msvc,
4148
arch: win64,
42-
os: windows-2019
43-
}
49+
os: windows-2019,
50+
build-cmd: "cargo",
51+
}
4452
steps:
4553
- name: Checkout source code
4654
uses: actions/checkout@v4
@@ -59,17 +67,15 @@ jobs:
5967
;;
6068
esac
6169
70+
cargo install cross --git https://github.com/cross-rs/cross
71+
6272
- name: Install Rust toolchain
6373
run: |
6474
rustup show
6575
rustup target add ${{ matrix.job.target }}
6676
6777
- name: Build
68-
uses: actions-rs/cargo@v1
69-
with:
70-
use-cross: ${{ matrix.job.use-cross }}
71-
command: build
72-
args: --release --bins --lib --features=${{ github.event.inputs.features}} --target=${{ matrix.job.target }} --manifest-path zenoh-jni/Cargo.toml
78+
run: ${{ matrix.job.build-cmd }} build --release --bins --lib --features=${{ github.event.inputs.features}} --target=${{ matrix.job.target }} --manifest-path zenoh-jni/Cargo.toml
7379

7480
- name: Packaging
7581
id: package

.github/workflows/release.yml

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ jobs:
2020
os: [ ubuntu-latest, macOS-latest ]
2121

2222
steps:
23-
- uses: actions/checkout@v3
23+
- uses: actions/checkout@v4
2424

2525
- uses: actions/setup-java@v3
2626
with:
@@ -34,11 +34,10 @@ jobs:
3434
add-to-path: false
3535
link-to-sdk: true
3636

37-
- name: Install Rust
38-
uses: actions-rs/toolchain@v1
39-
with:
40-
override: true
41-
components: rustfmt, clippy
37+
- name: Install Rust toolchain
38+
run: |
39+
rustup show
40+
rustup component add rustfmt clippy
4241
4342
- name: Cargo Format
4443
working-directory: zenoh-jni

0 commit comments

Comments
 (0)