Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
33 changes: 33 additions & 0 deletions .github/ISSUE_TEMPLATE/bug_report.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
---
name: "\U0001F41E Bug Report"
about: "If something isn't working as expected \U0001F914."
title: ''
labels: 'i: bug, i: needs triage'
assignees: ''

---

**What steps will reproduce the bug?**
(please provide small code example that reproduces the issue when possible)

1. step 1
2. step 2
3. ...

**What happens?**

...

**What did you expect to happen instead?**

...

**How did you install ristretto `java`?**

<!-- ristretto_cli-installer.sh, homebrew, GitHub release, etc. -->

### Information about your environment

* ristretto version: [REQUIRED] (e.g. output of `java --version` preferred: "java/0.8.0 Mac-OS/15.0.1/arm64")
* Runtime Version: [REQUIRED] (e.g. 21.0.4.7.1)
* Operating system: [REQUIRED]
1 change: 1 addition & 0 deletions .github/ISSUE_TEMPLATE/config.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
blank_issues_enabled: false
20 changes: 20 additions & 0 deletions .github/ISSUE_TEMPLATE/feature_request.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
---
name: "\U00002728 Feature Request"
about: "I have a suggestion (and may want to implement it \U0001F642)!"
title: ''
labels: 'i: enhancement, i: needs triage'
assignees: ''

---

**Is your feature request related to a problem? Please describe.**
A clear and concise description of what the problem is. Ex. I'm always frustrated when [...]

**Describe the solution you'd like**
A clear and concise description of what you want to happen.

**Describe alternatives you've considered**
A clear and concise description of any alternative solutions or features you've considered.

**Additional context**
Add any other context or screenshots about the feature request here.
59 changes: 27 additions & 32 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,8 +28,8 @@ jobs:
- macos-arm64
- macos-x64
- windows-x64
- wasm32-unknown
- wasm32-wasi
#- wasm32-unknown
#- wasm32-wasi

include:
- platform: linux-x64
Expand All @@ -44,12 +44,12 @@ jobs:
- platform: windows-x64
os: windows-2022
target: x86_64-pc-windows-msvc
- platform: wasm32-unknown
os: ubuntu-22.04
target: wasm32-unknown-unknown
- platform: wasm32-wasi
os: ubuntu-22.04
target: wasm32-wasip1-threads
# - platform: wasm32-unknown
# os: ubuntu-22.04
# target: wasm32-unknown-unknown
# - platform: wasm32-wasi
# os: ubuntu-22.04
# target: wasm32-wasip1-threads

steps:
- name: Checkout source code
Expand All @@ -58,17 +58,16 @@ jobs:
- name: Install Rust
uses: dtolnay/rust-toolchain@master
with:
components: 'llvm-tools-preview'
targets: ${{ matrix.target }}
toolchain: stable

- name: Install grcov
- name: Install cargo-llvm-cov
uses: taiki-e/install-action@main
with:
tool: grcov
tool: cargo-llvm-cov

- name: Build
if: ${{ startsWith(matrix.platform, 'wasm32-') }}
if: ${{ startsWith(matrix.platform, 'wasm32-') || startsWith(matrix.platform, 'windows-')}}
env:
CARGO_TERM_COLOR: always
GITHUB_TOKEN: ${{secrets.GITHUB_TOKEN}}
Expand All @@ -77,37 +76,33 @@ jobs:
cargo build --target ${{ matrix.target }}

- name: Tests
if: ${{ !startsWith(matrix.platform, 'wasm32-') }}
if: ${{ !startsWith(matrix.os, 'ubuntu-') && !startsWith(matrix.platform, 'wasm32-') && !startsWith(matrix.platform, 'windows-') }}
env:
CARGO_TERM_COLOR: always
GITHUB_TOKEN: ${{secrets.GITHUB_TOKEN}}
LLVM_PROFILE_FILE: ristretto-%p-%m.profraw
RUST_BACKTRACE: 1
RUST_LOG: info
RUSTFLAGS: -Cinstrument-coverage
RUSTDOCFLAGS: -Cinstrument-coverage
RUST_LOG_SPAN_EVENTS: full
run: |
cargo test --workspace --all-features
du -h ~/.ristretto

- name: Produce coverage info
if: ${{ startsWith(matrix.platform, 'linux-') }}
- name: Tests
if: ${{ startsWith(matrix.os, 'ubuntu-') }}
env:
CARGO_TERM_COLOR: always
GITHUB_TOKEN: ${{secrets.GITHUB_TOKEN}}
RUST_BACKTRACE: 1
RUST_LOG: info
RUST_LOG_SPAN_EVENTS: full
run: |
grcov $(find . -name "ristretto-*.profraw" -print) \
-s . \
--branch \
--ignore-not-existing \
--ignore='target/*' \
--ignore='benches/*' \
--ignore='/*' \
--binary-path ./target/debug/ \
--excl-line='#\[derive' \
-t lcov \
-o lcov.info
cargo llvm-cov --workspace --lcov --output-path lcov.info

- name: Upload to codecov.io
if: ${{ startsWith(matrix.platform, 'linux-') }}
if: ${{ startsWith(matrix.os, 'ubuntu-') }}
uses: codecov/codecov-action@v4
with:
files: lcov.info
fail_ci_if_error: true
token: ${{ secrets.CODECOV_TOKEN }}
verbose: true
env:
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}
2 changes: 2 additions & 0 deletions .github/workflows/fuzz.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,8 @@ jobs:
fuzz:
name: ${{ matrix.target }}
runs-on: ubuntu-latest
env:
RUSTUP_TOOLCHAIN: nightly
strategy:
fail-fast: false
matrix:
Expand Down
109 changes: 109 additions & 0 deletions .github/workflows/release-post-announce.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,109 @@
name: Publish

on:
# Defining workflow_call means that this workflow can be called from
# your main workflow job
workflow_call:
# cargo-dist exposes the plan from the plan step, as a JSON string,
# to your job if it needs it
inputs:
plan:
required: true
type: string

jobs:
upload-assets:
timeout-minutes: 60
strategy:
fail-fast: false
matrix:
include:
- { target: aarch64-apple-darwin, os: macos-14 }
# - { target: aarch64-linux-android, os: ubuntu-latest }
- { target: aarch64-unknown-linux-gnu, os: ubuntu-latest }
- { target: aarch64-unknown-linux-musl, os: ubuntu-latest }
# - { target: arm-linux-androideabi, os: ubuntu-latest }
- { target: arm-unknown-linux-gnueabi, os: ubuntu-latest }
# - { target: arm-unknown-linux-gnueabihf, os: ubuntu-latest }
# - { target: arm-unknown-linux-musleabi, os: ubuntu-latest }
# - { target: arm-unknown-linux-musleabihf, os: ubuntu-latest }
# - { target: armv5te-unknown-linux-gnueabi, os: ubuntu-latest }
# - { target: armv5te-unknown-linux-musleabi, os: ubuntu-latest }
# - { target: armv7-linux-androideabi, os: ubuntu-latest }
- { target: armv7-unknown-linux-gnueabi, os: ubuntu-latest }
- { target: armv7-unknown-linux-gnueabihf, os: ubuntu-latest }
- { target: armv7-unknown-linux-musleabi, os: ubuntu-latest }
- { target: armv7-unknown-linux-musleabihf, os: ubuntu-latest }
# - { target: i586-unknown-linux-gnu, os: ubuntu-latest }
# - { target: i586-unknown-linux-musl, os: ubuntu-latest }
# - { target: i686-unknown-freebsd, os: ubuntu-latest }
# - { target: i686-linux-android, os: ubuntu-latest }
# - { target: i686-pc-windows-gnu, os: windows-latest }
- { target: i686-unknown-linux-gnu, os: ubuntu-latest }
# - { target: mips-unknown-linux-gnu, os: ubuntu-latest }
# - { target: mips-unknown-linux-musl, os: ubuntu-latest }
# - { target: mips64-unknown-linux-gnuabi64, os: ubuntu-latest }
# - { target: mips64-unknown-linux-muslabi64, os: ubuntu-latest }
# - { target: mips64el-unknown-linux-gnuabi64, os: ubuntu-latest }
# - { target: mips64el-unknown-linux-muslabi64, os: ubuntu-latest }
# - { target: mipsel-unknown-linux-gnu, os: ubuntu-latest }
# - { target: mipsel-unknown-linux-musl, os: ubuntu-latest }
# - { target: powerpc-unknown-linux-gnu, os: ubuntu-latest }
# - { target: powerpc64-unknown-linux-gnu, os: ubuntu-latest }
- { target: powerpc64le-unknown-linux-gnu, os: ubuntu-latest }
# - { target: riscv64gc-unknown-linux-gnu, os: ubuntu-latest }
- { target: s390x-unknown-linux-gnu, os: ubuntu-latest }
# - { target: sparc64-unknown-linux-gnu, os: ubuntu-latest }
# - { target: sparcv9-sun-solaris, os: ubuntu-latest }
# - { target: thumbv6m-none-eabi, os: ubuntu-latest }
# - { target: thumbv7em-none-eabi, os: ubuntu-latest }
# - { target: thumbv7em-none-eabihf, os: ubuntu-latest }
# - { target: thumbv7m-none-eabi, os: ubuntu-latest }
# - { target: thumbv7neon-linux-androideabi, os: ubuntu-latest }
# - { target: thumbv7neon-unknown-linux-gnueabihf, os: ubuntu-latest }
# - { target: thumbv8m.base-none-eabi, os: ubuntu-latest }
# - { target: thumbv8m.main-none-eabi, os: ubuntu-latest }
# - { target: thumbv8m.main-none-eabihf, os: ubuntu-latest }
# - { target: wasm32-unknown-emscripten, os: ubuntu-latest }
- { target: x86_64-apple-darwin, os: macos-12 }
# - { target: x86_64-linux-android, os: ubuntu-latest }
# - { target: x86_64-pc-windows-gnu, os: windows-latest }
# - { target: x86_64-pc-windows-msvc, os: windows-latest }
# - { target: x86_64-sun-solaris, os: ubuntu-latest }
# - { target: x86_64-unknown-freebsd, os: ubuntu-latest }
# - { target: x86_64-unknown-dragonfly, os: ubuntu-latest }
# - { target: x86_64-unknown-illumos, os: ubuntu-latest }
- { target: x86_64-unknown-linux-gnu, os: ubuntu-latest }
- { target: x86_64-unknown-linux-musl, os: ubuntu-latest }
# - { target: x86_64-unknown-netbsd, os: ubuntu-latest }
runs-on: ${{ matrix.os }}
steps:
- name: Checkout source code
uses: actions/checkout@v4

- name: Install cross-compilation tools
if: ${{ startsWith(matrix.os, 'ubuntu') }}
uses: taiki-e/setup-cross-toolchain-action@v1
with:
target: ${{ matrix.target }}

- uses: taiki-e/upload-rust-binary-action@v1
with:
bin: java
# (optional) Comma-separated list of algorithms to be used for checksum.
# [default value: ]
# [possible values: sha256, sha512, sha1, or md5]
checksum: sha256
# (optional) On which platform to distribute the `.tar.gz` file.
# [default value: unix]
# [possible values: all, unix, windows, none]
tar: all
# (optional) On which platform to distribute the `.zip` file.
# [default value: windows]
# [possible values: all, unix, windows, none]
zip: windows
# (optional) Target triple, default is host triple.
target: ${{ matrix.target }}
env:
# (required)
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
Loading