git.delta.rocks / jrsonnet / refs/commits / 6aae8b5863ce

difftreelog

release use cargo for non x64 architectures

Bruno Felipe Leal Delfino2021-06-01parent: #f4a2c24.patch.diff
in: master

6 files changed

modified.github/workflows/release.ymldiffbeforeafterboth
before · .github/workflows/release.yml
1name: CI23on: [push]45jobs:6  test:7    name: Test Suite8    runs-on: ubuntu-latest9    steps:10      - name: Checkout sources11        uses: actions/checkout@v212      - name: Install stable toolchain13        uses: actions-rs/toolchain@v114        with:15          toolchain: stable16          override: true17      - name: Run tests18        uses: actions-rs/cargo@v119        with:20          command: test21          args: --all2223  cargo-release:24    if: startsWith(github.ref, 'refs/tags/')25    needs: [test]26    runs-on: ubuntu-latest27    steps:28      - name: Checkout sources29        uses: actions/checkout@v230      - name: Install stable toolchain31        uses: actions-rs/toolchain@v132        with:33          toolchain: stable34          override: true35      - name: Install cargo release command36        uses: actions-rs/cargo@v137        with:38          command: install39          args: cargo-release40      - name: Run cargo login41        uses: actions-rs/cargo@v142        with:43          command: login44          args: ${{ secrets.CARGO_TOKEN }}45      - name: Publish crates46        uses: actions-rs/cargo@v147        with:48          command: release49          args: --no-dev-version --skip-push --skip-tag --no-confirm5051  github-release:52    if: startsWith(github.ref, 'refs/tags/')53    needs: [test]54    strategy:55      matrix:56        target:57          # Tier 158          - aarch64-unknown-linux-gnu59          - i686-pc-windows-gnu60          - i686-pc-windows-msvc61          - i686-unknown-linux-gnu62          - x86_64-apple-darwin63          - x86_64-pc-windows-gnu64          - x86_64-pc-windows-msvc65          - x86_64-unknown-linux-gnu6667          # Other68          - x86_64-unknown-linux-musl69        include:70          - target: aarch64-unknown-linux-gnu71            os: ubuntu-latest72            bin: jrsonnet73            name: jrsonnet-linux-gnu-aarch6474          - target: i686-pc-windows-gnu75            os: windows-latest76            bin: jrsonnet.exe77            name: jrsonnet-windows-gnu-i686.exe78          - target: i686-pc-windows-msvc79            os: windows-latest80            bin: jrsonnet.exe81            name: jrsonnet-windows-msvc-i686.exe82          - target: i686-unknown-linux-gnu83            os: ubuntu-latest84            bin: jrsonnet85            name: jrsonnet-linux-gnu-i68686          - target: x86_64-apple-darwin87            os: macOS-latest88            bin: jrsonnet89            name: jrsonnet-darwin-amd6490          - target: x86_64-pc-windows-gnu91            os: windows-latest92            bin: jrsonnet.exe93            name: jrsonnet-windows-gnu-amd64.exe94          - target: x86_64-pc-windows-msvc95            os: windows-latest96            bin: jrsonnet.exe97            name: jrsonnet-windows-msvc-amd64.exe98          - target: x86_64-unknown-linux-gnu99            os: ubuntu-latest100            bin: jrsonnet101            name: jrsonnet-linux-gnu-amd64102103          - target: x86_64-unknown-linux-musl104            os: ubuntu-latest105            bin: jrsonnet106            name: jrsonnet-linux-musl-amd64107    runs-on: ${{ matrix.os }}108    steps:109      - name: Install stable toolchain110        uses: actions-rs/toolchain@v1111        with:112          toolchain: stable113          override: true114          target: ${{ matrix.target }}115116      - name: Checkout117        uses: actions/checkout@v2118119      - name: Linux x86 cross compiler120        if: ${{ matrix.target == 'i686-unknown-linux-gnu' }}121        run: sudo apt install gcc-multilib122123      - name: Windows x86 cross compiler124        if: ${{ matrix.target == 'i686-pc-windows-gnu' }}125        uses: egor-tensin/setup-mingw@v2126        with:127          platform: x86128129      - name: ARM cross compiler130        if: ${{ matrix.target == 'aarch64-unknown-linux-gnu' }}131        uses: actions-rs/cargo@v1132        with:133          command: install134          args: cross135136      - name: ARM gcc137        if: ${{ matrix.target == 'aarch64-unknown-linux-gnu' }}138        run: sudo apt install gcc-aarch64-linux-gnu139140      - name: Run ARM build141        if: ${{ matrix.target == 'aarch64-unknown-linux-gnu' }}142        shell: bash143        run: cross build --bin=jrsonnet --release --target ${{ matrix.target }}144145      - name: Run ARM strip146        if: ${{ matrix.target == 'aarch64-unknown-linux-gnu' }}147        shell: bash148        run: aarch64-linux-gnu-strip target/${{ matrix.target }}/release/${{ matrix.bin }}149150      - name: Run build151        if: ${{ matrix.target != 'aarch64-unknown-linux-gnu' }}152        uses: actions-rs/cargo@v1153        with:154          command: build155          args: --bin=jrsonnet --release --target ${{ matrix.target }}156157      - name: Run strip158        if: ${{ matrix.target != 'aarch64-unknown-linux-gnu' }}159        shell: bash160        run: strip target/${{ matrix.target }}/release/${{ matrix.bin }}161162      - name: Package163        shell: bash164        run: |165          cd target/${{ matrix.target }}/release166167          cp ${{ matrix.bin }} ../../../${{ matrix.name }}168          cd -169170      - name: Generate SHA-256171        run: shasum -a 256 ${{ matrix.name }} > ${{ matrix.name }}.sha256172173      - name: Publish174        uses: softprops/action-gh-release@v1175        with:176          draft: true177          files: "jrsonnet*"178        env:179          GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
modifiedREADME.mddiffbeforeafterboth
--- a/README.md
+++ b/README.md
@@ -16,6 +16,10 @@
 
 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
modifiedcmds/jrsonnet/Cargo.tomldiffbeforeafterboth
--- a/cmds/jrsonnet/Cargo.toml
+++ b/cmds/jrsonnet/Cargo.toml
@@ -5,7 +5,6 @@
 authors = ["Yaroslav Bolyukin <iam@lach.pw>"]
 license = "MIT"
 edition = "2018"
-publish = false
 
 [features]
 default = []
modifiedcrates/jrsonnet-cli/Cargo.tomldiffbeforeafterboth
--- a/crates/jrsonnet-cli/Cargo.toml
+++ b/crates/jrsonnet-cli/Cargo.toml
@@ -5,7 +5,6 @@
 authors = ["Yaroslav Bolyukin <iam@lach.pw>"]
 license = "MIT"
 edition = "2018"
-publish = false
 
 [dependencies]
 jrsonnet-evaluator = { path = "../../crates/jrsonnet-evaluator", version = "0.3.6", features = ["explaining-traces"] }
deletedcrates/jrsonnet-interner/.gitignorediffbeforeafterboth
--- a/crates/jrsonnet-interner/.gitignore
+++ /dev/null
@@ -1,2 +0,0 @@
-/target
-Cargo.lock
modifiedcrates/jrsonnet-stdlib/Cargo.tomldiffbeforeafterboth
--- a/crates/jrsonnet-stdlib/Cargo.toml
+++ b/crates/jrsonnet-stdlib/Cargo.toml
@@ -5,7 +5,3 @@
 authors = ["Yaroslav Bolyukin <iam@lach.pw>"]
 license = "MIT"
 edition = "2018"
-
-[features]
-
-[dependencies]