Skip to content

Commit

Permalink
Revert "Merge pull request #44 from bruno-delfino1995/use-clap-prerel…
Browse files Browse the repository at this point in the history
…ease"

This reverts commit b21f06a, reversing
changes made to 7a7e4e4.

Signed-off-by: Yaroslav Bolyukin <[email protected]>
  • Loading branch information
CertainLach committed Jun 11, 2021
1 parent 6794ed5 commit f7013a5
Show file tree
Hide file tree
Showing 7 changed files with 95 additions and 21 deletions.
67 changes: 66 additions & 1 deletion .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -54,15 +54,43 @@ jobs:
strategy:
matrix:
target:
# Tier 1
- aarch64-unknown-linux-gnu
- i686-pc-windows-gnu
- i686-pc-windows-msvc
- i686-unknown-linux-gnu
- x86_64-apple-darwin
- x86_64-pc-windows-gnu
- x86_64-pc-windows-msvc
- x86_64-unknown-linux-gnu

# Other
- x86_64-unknown-linux-musl
include:
- target: aarch64-unknown-linux-gnu
os: ubuntu-latest
bin: jrsonnet
name: jrsonnet-linux-gnu-aarch64
- target: i686-pc-windows-gnu
os: windows-latest
bin: jrsonnet.exe
name: jrsonnet-windows-gnu-i686.exe
- target: i686-pc-windows-msvc
os: windows-latest
bin: jrsonnet.exe
name: jrsonnet-windows-msvc-i686.exe
- target: i686-unknown-linux-gnu
os: ubuntu-latest
bin: jrsonnet
name: jrsonnet-linux-gnu-i686
- target: x86_64-apple-darwin
os: macOS-latest
bin: jrsonnet
name: jrsonnet-darwin-amd64
- target: x86_64-pc-windows-gnu
os: windows-latest
bin: jrsonnet.exe
name: jrsonnet-windows-gnu-amd64.exe
- target: x86_64-pc-windows-msvc
os: windows-latest
bin: jrsonnet.exe
Expand All @@ -71,6 +99,7 @@ jobs:
os: ubuntu-latest
bin: jrsonnet
name: jrsonnet-linux-gnu-amd64

- target: x86_64-unknown-linux-musl
os: ubuntu-latest
bin: jrsonnet
Expand All @@ -87,16 +116,52 @@ jobs:
- name: Checkout
uses: actions/checkout@v2

- name: Linux x86 cross compiler
if: ${{ matrix.target == 'i686-unknown-linux-gnu' }}
run: sudo apt install gcc-multilib

- name: Windows x86 cross compiler
if: ${{ matrix.target == 'i686-pc-windows-gnu' }}
uses: egor-tensin/setup-mingw@v2
with:
platform: x86

- name: ARM cross compiler
if: ${{ matrix.target == 'aarch64-unknown-linux-gnu' }}
uses: actions-rs/cargo@v1
with:
command: install
args: cross

- name: ARM gcc
if: ${{ matrix.target == 'aarch64-unknown-linux-gnu' }}
run: sudo apt install gcc-aarch64-linux-gnu

- name: Run ARM build
if: ${{ matrix.target == 'aarch64-unknown-linux-gnu' }}
shell: bash
run: cross build --bin=jrsonnet --release --target ${{ matrix.target }}

- name: Run ARM strip
if: ${{ matrix.target == 'aarch64-unknown-linux-gnu' }}
shell: bash
run: aarch64-linux-gnu-strip target/${{ matrix.target }}/release/${{ matrix.bin }}

- name: Run build
if: ${{ matrix.target != 'aarch64-unknown-linux-gnu' }}
uses: actions-rs/cargo@v1
with:
command: build
args: --bin=jrsonnet --release --target ${{ matrix.target }}

- name: Run strip
if: ${{ matrix.target != 'aarch64-unknown-linux-gnu' }}
shell: bash
run: strip target/${{ matrix.target }}/release/${{ matrix.bin }}

- name: Package
shell: bash
run: |
strip target/${{ matrix.target }}/release/${{ matrix.bin }}
cd target/${{ matrix.target }}/release
cp ${{ matrix.bin }} ../../../${{ matrix.name }}
Expand Down
18 changes: 7 additions & 11 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 0 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,10 +16,6 @@ This implementation shows performance better than all existing implementations.

In the end, it's always fun to implement something in Rust.

## How to install?

We build x64 binaries for Apple, Windows MSVC, and Linux GNU during the release process. If your system is one of those, you can check out the [latest release](https://github.com/CertainLach/jrsonnet/releases/latest) to get your pre-built binary. Otherwise, you'll need to have a rust toolchain and install the package through cargo with `cargo install jrsonnet`.

## Compliance with the [specification](https://jsonnet.org/ref/spec.html)

- Passes all the original `examples` tests
Expand Down
11 changes: 9 additions & 2 deletions cmds/jrsonnet/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ version = "0.3.7"
authors = ["Yaroslav Bolyukin <[email protected]>"]
license = "MIT"
edition = "2018"
publish = false

[features]
default = []
Expand All @@ -18,5 +19,11 @@ jrsonnet-cli = { path = "../../crates/jrsonnet-cli", version = "0.3.7" }
# TODO: Fix mimalloc compile errors, and use them
mimallocator = { version = "0.1.3", optional = true }
thiserror = "1.0"
clap = "3.0.0-beta.2"
clap_generate = "3.0.0-beta.2"

[dependencies.clap]
git = "https://github.com/clap-rs/clap"
rev = "92f744cc49d12d32261010d355dc215a6d2487b9"

[dependencies.clap_generate]
git = "https://github.com/clap-rs/clap"
rev = "92f744cc49d12d32261010d355dc215a6d2487b9"
10 changes: 7 additions & 3 deletions crates/jrsonnet-cli/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,12 @@ version = "0.3.7"
authors = ["Yaroslav Bolyukin <[email protected]>"]
license = "MIT"
edition = "2018"
publish = false

[dependencies]
jrsonnet-evaluator = { path = "../../crates/jrsonnet-evaluator", version = "0.3.7", features = ["explaining-traces"] }
jrsonnet-parser = { path = "../../crates/jrsonnet-parser", version = "0.3.7" }
clap = "3.0.0-beta.2"
jrsonnet-evaluator = { path = "../../crates/jrsonnet-evaluator", version = "0.3.6", features = ["explaining-traces"] }
jrsonnet-parser = { path = "../../crates/jrsonnet-parser", version = "0.3.6" }

[dependencies.clap]
git = "https://github.com/clap-rs/clap"
rev = "92f744cc49d12d32261010d355dc215a6d2487b9"
2 changes: 2 additions & 0 deletions crates/jrsonnet-interner/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
/target
Cargo.lock
4 changes: 4 additions & 0 deletions crates/jrsonnet-stdlib/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -5,3 +5,7 @@ version = "0.3.7"
authors = ["Yaroslav Bolyukin <[email protected]>"]
license = "MIT"
edition = "2018"

[features]

[dependencies]

0 comments on commit f7013a5

Please sign in to comment.