Skip to content

chore(release): prepare v4.0.2 #95

chore(release): prepare v4.0.2

chore(release): prepare v4.0.2 #95

Workflow file for this run

name: CI
# Draft pull requests only run the Linux checks. The macOS package job starts
# when a pull request is ready for review and on every push to main.
on:
pull_request:
types: [opened, synchronize, reopened, ready_for_review]
push:
branches: [main]
permissions:
contents: read
concurrency:
group: ci-${{ github.event.pull_request.number || github.ref }}
cancel-in-progress: true
jobs:
rust:
name: Rust checks and tests
runs-on: ubuntu-latest
timeout-minutes: 20
steps:
- uses: actions/checkout@v4
with:
persist-credentials: false
- uses: dtolnay/rust-toolchain@stable
with:
components: rustfmt, clippy
- uses: Swatinem/rust-cache@v2
- uses: actions/setup-node@v4
with:
node-version: 22
- name: Test package resources
run: node --test --test-timeout=60000 scripts/package/*.test.mjs
- name: Test bounded integration tool cleanup
run: node --test --test-timeout=15000 scripts/compiler/process.test.mjs
- name: Check formatting
run: cargo fmt --all --check
- name: Lint
run: cargo clippy --workspace --all-targets --locked -- -D warnings
- name: Test
run: cargo test --workspace --locked
- name: Check the pinned plugin SDK release
run: scripts/verify-sdk-lock.sh --download
package:
name: Build and verify the macOS packages
if: github.event_name != 'pull_request' || !github.event.pull_request.draft
runs-on: macos-26
timeout-minutes: 45
steps:
- uses: actions/checkout@v4
with:
persist-credentials: false
- uses: actions/setup-node@v4
with:
node-version: 22
# scripts/assemble-package.sh compiles the plugin backend for each
# architecture it packages.
- uses: dtolnay/rust-toolchain@stable
with:
targets: aarch64-apple-darwin, x86_64-apple-darwin
# Downloads are named by their SHA-256 and verified again before use.
- name: Restore verified third-party downloads
uses: actions/cache@v4
with:
path: .artifacts/jdtls-downloads
key: third-party-${{ hashFiles('third_party/*/manifest.json') }}
# The package ships no JDK. This one compiles the plugin's own JDT LS
# extension bundle while packaging, and the integration tests run the
# tested JDT LS release on it, as a user's JDK 21+ would.
- uses: actions/setup-java@v5
with:
distribution: temurin
java-version: "21"
- name: Build, verify and archive both architectures
run: |
set -euo pipefail
for arch in arm64 x86_64; do
package=$(scripts/build-package.sh --arch "$arch")
scripts/archive-package.sh --package "$package" --arch "$arch"
done
- name: Verify native compiler settings and JARs with the user's JDT LS
run: |
package=".artifacts/package/$(uname -m)/io.github.lithe-idea.java-support"
node scripts/compiler/test-live.mjs "$package"
LITHE_JAVA_PROJECT_KIND=eclipse node scripts/compiler/test-live.mjs "$package"
node scripts/compiler/test-project-models.mjs "$package"
node scripts/compiler/test-module-structure.mjs "$package"
- name: Upload native compiler projections
uses: actions/upload-artifact@v4
with:
name: native-compiler-projection
path: .artifacts/compiler/visual-*.json
if-no-files-found: error
- name: Upload the archives
uses: actions/upload-artifact@v4
with:
name: java-support-archives
path: dist/
retention-days: 7
if-no-files-found: error
linux:
name: Build and run Linux ${{ matrix.arch }} package
strategy:
fail-fast: false
matrix:
include:
- os: ubuntu-24.04
arch: x64
- os: ubuntu-24.04-arm
arch: arm64
runs-on: ${{ matrix.os }}
timeout-minutes: 40
steps:
- uses: actions/checkout@v4
with:
persist-credentials: false
- uses: dtolnay/rust-toolchain@stable
- uses: Swatinem/rust-cache@v2
- uses: actions/setup-node@v4
with:
node-version: 22
- name: Install packaging tools
run: sudo apt-get update && sudo apt-get install -y zsh zip unzip
# The package ships no JDK; the integration tests run the tested JDT LS
# release on this one, as a user's JDK 21+ would.
- uses: actions/setup-java@v5
with:
distribution: temurin
java-version: "21"
- name: Restore checksum-verified downloads
uses: actions/cache@v4
with:
path: .artifacts/jdtls-downloads
key: linux-${{ matrix.arch }}-${{ hashFiles('third_party/*/manifest.json') }}
- name: Test the native backend
run: cargo test --workspace --locked
- name: Build and verify the archive
run: node scripts/package/build-linux.mjs "${{ matrix.arch }}"
- name: Start the packaged backend and the user's language server
run: node scripts/package/smoke-linux.mjs dist/*-linux-${{ matrix.arch }}.zip
- name: Compile legacy and cross-IDE project models with the user's language server
run: |
package=$(mktemp -d)
unzip -q dist/*-linux-${{ matrix.arch }}.zip -d "$package"
node scripts/compiler/test-project-models.mjs "$package/io.github.lithe-idea.java-support"
node scripts/compiler/test-module-structure.mjs "$package/io.github.lithe-idea.java-support"
rm -rf "$package"
- uses: actions/upload-artifact@v4
with:
name: java-linux-${{ matrix.arch }}
path: |
dist/*-linux-*.zip
dist/*-linux-*.zip.sha256
if-no-files-found: error
retention-days: 7
jsp-grammar-host:
# Runs on drafts too: it needs neither the Rust Core nor a package, only the
# host's pure-Go editor packages.
name: JSP grammar on the host tokenizer
runs-on: ubuntu-latest
timeout-minutes: 15
steps:
- uses: actions/checkout@v4
with:
persist-credentials: false
- name: Read pinned host revision
id: host
run: echo "revision=$(node -p 'JSON.parse(require("fs").readFileSync("grammar-host.json")).revision')" >> "$GITHUB_OUTPUT"
- uses: actions/checkout@v4
with:
repository: 1lck/Lithe-IDEA
ref: ${{ steps.host.outputs.revision }}
path: .artifacts/grammar-host
sparse-checkout: desktop
persist-credentials: false
- uses: actions/setup-go@v5
with:
go-version-file: .artifacts/grammar-host/desktop/go.mod
cache: false
- uses: actions/setup-node@v4
with:
node-version: 22
- name: Tokenize JSP with the host's TextMate engine
run: node scripts/grammar/host-jsp.mjs .artifacts/grammar-host
native-settings-visual:
name: Native compiler settings screenshots
if: github.event_name != 'pull_request' || !github.event.pull_request.draft
needs: package
runs-on: ubuntu-latest
timeout-minutes: 25
steps:
- uses: actions/checkout@v4
- uses: actions/download-artifact@v4
with:
name: native-compiler-projection
path: .artifacts/compiler
- name: Read pinned host revision
id: host
run: echo "revision=$(node -p 'JSON.parse(require("fs").readFileSync("compiler-host.json")).revision')" >> "$GITHUB_OUTPUT"
- uses: actions/checkout@v4
with:
repository: 1lck/Lithe-IDEA
ref: ${{ steps.host.outputs.revision }}
path: .artifacts/host
- uses: actions/setup-go@v5
with:
go-version-file: .artifacts/host/desktop/go.mod
cache: false
- uses: dtolnay/rust-toolchain@master
with:
toolchain: 1.100.0
- uses: actions/setup-node@v4
with:
node-version: 22
- name: Render actual compiler projections through the native host
run: node scripts/compiler/visual.mjs .artifacts/host
- uses: actions/upload-artifact@v4
with:
name: native-compiler-settings-screenshots
path: .artifacts/compiler/visual/
if-no-files-found: error
retention-days: 14