Skip to content

Commit 2fc7c01

Browse files
authored
Merge pull request #207 from rage/jdk-17
Try upgrading to jdk 17
2 parents 9cc73a1 + 93c8d0f commit 2fc7c01

File tree

4 files changed

+25
-12
lines changed

4 files changed

+25
-12
lines changed

.github/workflows/test.yml

+18-5
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ name: Run tests
33
on:
44
push:
55
branches: [main, "[0-9]+.[0-9]+"]
6-
pull_request_target:
6+
pull_request:
77
branches: [main, "[0-9]+.[0-9]+"]
88

99
env:
@@ -16,6 +16,16 @@ jobs:
1616
strategy:
1717
matrix:
1818
os: [ubuntu-latest, windows-latest, macos-latest]
19+
include:
20+
- os: ubuntu-latest
21+
rust-target: x86_64-unknown-linux-gnu
22+
java-arch: x64
23+
- os: windows-latest
24+
rust-target: x86_64-pc-windows-msvc
25+
java-arch: x64
26+
- os: macos-latest
27+
rust-target: x86_64-apple-darwin
28+
java-arch: x64
1929
fail-fast: false
2030
runs-on: ${{ matrix.os }}
2131

@@ -28,6 +38,8 @@ jobs:
2838
components: clippy, rustfmt
2939
- name: Cache
3040
uses: Swatinem/rust-cache@v2
41+
- name: Add rustup target
42+
run: rustup target add ${{ matrix.rust-target }}
3143

3244
- name: Diagnostics on Windows
3345
if: matrix.os == 'windows-latest'
@@ -41,10 +53,10 @@ jobs:
4153
run: cargo fmt -- --check
4254
- name: Clippy
4355
if: matrix.os == 'ubuntu-latest'
44-
run: cargo clippy --all-features
56+
run: cargo clippy --all-features --target ${{ matrix.rust-target }}
4557

4658
- name: Build test binary
47-
run: cargo test --no-run
59+
run: cargo test --no-run --target ${{ matrix.rust-target }}
4860

4961
- name: Install dependencies
5062
if: matrix.os == 'ubuntu-latest'
@@ -57,7 +69,8 @@ jobs:
5769
uses: actions/setup-java@v3
5870
with:
5971
distribution: "temurin"
60-
java-version: "11"
72+
java-version: "17"
73+
architecture: ${{ matrix.java-arch }}
6174

6275
- name: Install Node
6376
uses: actions/setup-node@v3
@@ -81,4 +94,4 @@ jobs:
8194
Rscript -e 'install.packages("crates/plugins/r/tests/tmcRtestrunner", repos=NULL, type="source")'
8295
8396
- name: Run tests
84-
run: cargo test --no-fail-fast
97+
run: cargo test --no-fail-fast --target ${{ matrix.rust-target }}

.github/workflows/upload-binaries.yml

+5-5
Original file line numberDiff line numberDiff line change
@@ -101,7 +101,7 @@ jobs:
101101
gsutil cp ./target/${{ matrix.target }}/release/tmc-langs-cli.exe gs://${{ secrets.GCP_BUCKET }}/tmc-langs-rust/tmc-langs-cli-${{ matrix.target }}-$Env:TAG.exe
102102
gsutil cp ./crates/bindings/tmc-langs-node/ts/functions.node gs://${{ secrets.GCP_BUCKET }}/tmc-langs-rust/tmc-langs-${{ matrix.target }}-$Env:TAG.node
103103
104-
macos-11:
104+
macos:
105105
runs-on: macos-11
106106
strategy:
107107
matrix:
@@ -127,13 +127,13 @@ jobs:
127127

128128
- name: Cargo build
129129
run: |
130-
cargo build -p tmc-langs-cli --release
130+
rustup target add ${{ matrix.target }}
131+
cargo build -p tmc-langs-cli --release --target ${{ matrix.target }}
131132
npm --prefix ./crates/bindings/tmc-langs-node install
132133
npm run --prefix ./crates/bindings/tmc-langs-node build -- --release
133134
- name: Sign
134135
run: codesign --force -s - target/release/tmc-langs-cli
135136
- name: Deploy
136137
run: |
137-
rustup target add ${{ matrix.target }}
138-
gsutil cp ./target/release/tmc-langs-cli gs://${{ secrets.GCP_BUCKET }}/tmc-langs-rust/tmc-langs-cli-${{ matrix.target }}-$TAG
139-
gsutil cp ./crates/bindings/tmc-langs-node/ts/functions.node gs://${{ secrets.GCP_BUCKET }}/tmc-langs-rust/tmc-langs-${{ matrix.target }}-$TAG.node
138+
gsutil cp ./target/release/tmc-langs-cli gs://${{ secrets.GCP_BUCKET }}/tmc-langs-rust/tmc-langs-cli-${{ matrix.target }}-$TAG
139+
gsutil cp ./crates/bindings/tmc-langs-node/ts/functions.node gs://${{ secrets.GCP_BUCKET }}/tmc-langs-rust/tmc-langs-${{ matrix.target }}-$TAG.node

CONTRIBUTING.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ Install [Node.js and npm](https://docs.npmjs.com/downloading-and-installing-node
1818

1919
Install [Python 3](https://www.python.org/downloads/). You may wish to use [pyenv](https://github.com/pyenv/pyenv/) to manage different Python versions conveniently.
2020

21-
Install [OpenJDK 11](https://openjdk.java.net/install/index.html) (other versions may work as well) and [ant](https://ant.apache.org/).
21+
Install [OpenJDK 17](https://openjdk.java.net/install/index.html) (other versions may work as well) and [ant](https://ant.apache.org/).
2222

2323
Install [.NET 6.0](https://dotnet.microsoft.com/download).
2424

docker/Dockerfile

+1-1
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ RUN apt update \
1414
# languages
1515
npm \
1616
python3 \
17-
openjdk-11-jdk ant maven \
17+
openjdk-17-jdk ant maven \
1818
dotnet-sdk-6.0 \
1919
check valgrind \
2020
r-base r-cran-devtools locales \

0 commit comments

Comments
 (0)