Skip to content

Commit

Permalink
Merge pull request #207 from rage/jdk-17
Browse files Browse the repository at this point in the history
Try upgrading to jdk 17
  • Loading branch information
Heliozoa authored Aug 23, 2023
2 parents 9cc73a1 + 93c8d0f commit 2fc7c01
Show file tree
Hide file tree
Showing 4 changed files with 25 additions and 12 deletions.
23 changes: 18 additions & 5 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ name: Run tests
on:
push:
branches: [main, "[0-9]+.[0-9]+"]
pull_request_target:
pull_request:
branches: [main, "[0-9]+.[0-9]+"]

env:
Expand All @@ -16,6 +16,16 @@ jobs:
strategy:
matrix:
os: [ubuntu-latest, windows-latest, macos-latest]
include:
- os: ubuntu-latest
rust-target: x86_64-unknown-linux-gnu
java-arch: x64
- os: windows-latest
rust-target: x86_64-pc-windows-msvc
java-arch: x64
- os: macos-latest
rust-target: x86_64-apple-darwin
java-arch: x64
fail-fast: false
runs-on: ${{ matrix.os }}

Expand All @@ -28,6 +38,8 @@ jobs:
components: clippy, rustfmt
- name: Cache
uses: Swatinem/rust-cache@v2
- name: Add rustup target
run: rustup target add ${{ matrix.rust-target }}

- name: Diagnostics on Windows
if: matrix.os == 'windows-latest'
Expand All @@ -41,10 +53,10 @@ jobs:
run: cargo fmt -- --check
- name: Clippy
if: matrix.os == 'ubuntu-latest'
run: cargo clippy --all-features
run: cargo clippy --all-features --target ${{ matrix.rust-target }}

- name: Build test binary
run: cargo test --no-run
run: cargo test --no-run --target ${{ matrix.rust-target }}

- name: Install dependencies
if: matrix.os == 'ubuntu-latest'
Expand All @@ -57,7 +69,8 @@ jobs:
uses: actions/setup-java@v3
with:
distribution: "temurin"
java-version: "11"
java-version: "17"
architecture: ${{ matrix.java-arch }}

- name: Install Node
uses: actions/setup-node@v3
Expand All @@ -81,4 +94,4 @@ jobs:
Rscript -e 'install.packages("crates/plugins/r/tests/tmcRtestrunner", repos=NULL, type="source")'
- name: Run tests
run: cargo test --no-fail-fast
run: cargo test --no-fail-fast --target ${{ matrix.rust-target }}
10 changes: 5 additions & 5 deletions .github/workflows/upload-binaries.yml
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,7 @@ jobs:
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
gsutil cp ./crates/bindings/tmc-langs-node/ts/functions.node gs://${{ secrets.GCP_BUCKET }}/tmc-langs-rust/tmc-langs-${{ matrix.target }}-$Env:TAG.node
macos-11:
macos:
runs-on: macos-11
strategy:
matrix:
Expand All @@ -127,13 +127,13 @@ jobs:

- name: Cargo build
run: |
cargo build -p tmc-langs-cli --release
rustup target add ${{ matrix.target }}
cargo build -p tmc-langs-cli --release --target ${{ matrix.target }}
npm --prefix ./crates/bindings/tmc-langs-node install
npm run --prefix ./crates/bindings/tmc-langs-node build -- --release
- name: Sign
run: codesign --force -s - target/release/tmc-langs-cli
- name: Deploy
run: |
rustup target add ${{ matrix.target }}
gsutil cp ./target/release/tmc-langs-cli gs://${{ secrets.GCP_BUCKET }}/tmc-langs-rust/tmc-langs-cli-${{ matrix.target }}-$TAG
gsutil cp ./crates/bindings/tmc-langs-node/ts/functions.node gs://${{ secrets.GCP_BUCKET }}/tmc-langs-rust/tmc-langs-${{ matrix.target }}-$TAG.node
gsutil cp ./target/release/tmc-langs-cli gs://${{ secrets.GCP_BUCKET }}/tmc-langs-rust/tmc-langs-cli-${{ matrix.target }}-$TAG
gsutil cp ./crates/bindings/tmc-langs-node/ts/functions.node gs://${{ secrets.GCP_BUCKET }}/tmc-langs-rust/tmc-langs-${{ matrix.target }}-$TAG.node
2 changes: 1 addition & 1 deletion CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ Install [Node.js and npm](https://docs.npmjs.com/downloading-and-installing-node

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.

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

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

Expand Down
2 changes: 1 addition & 1 deletion docker/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ RUN apt update \
# languages
npm \
python3 \
openjdk-11-jdk ant maven \
openjdk-17-jdk ant maven \
dotnet-sdk-6.0 \
check valgrind \
r-base r-cran-devtools locales \
Expand Down

0 comments on commit 2fc7c01

Please sign in to comment.