Skip to content

Commit

Permalink
ci: add distribution builds
Browse files Browse the repository at this point in the history
  • Loading branch information
eduardosm committed Apr 7, 2024
1 parent caab9ac commit 37db92f
Show file tree
Hide file tree
Showing 2 changed files with 39 additions and 0 deletions.
26 changes: 26 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -61,3 +61,29 @@ jobs:
run: ./ci/install-rust.sh "${{ matrix.rust-version }}" --profile minimal
- name: Build and test
run: ./ci/build-and-test.sh

build-dist:
runs-on: ubuntu-20.04
matrix:
include:
- image: quay.io/pypa/manylinux2014_x86_64
- script: ./ci/build-disk.sh
- output: target/release/rsjsonnet
- artifact: rsjsonnet_linux-x86_64
steps:
- uses: actions/checkout@v4
- name: Pull image
run: docker pull ${{ matrix.image }}
- name: Build
run: |
docker run \
-v "$(pwd):/workdir" \
-w /workdir \
${{ matrix.image }} \
bash -c ${{ matrix.script }}
- name: Upload artifact
uses: actions/upload-artifact@v4
with:
name: ${{ matrix.artifact }}
path: ${{ matrix.output }}
if-no-files-found: error
13 changes: 13 additions & 0 deletions ci/build-dist.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
#!/usr/bin/env bash
set -euo pipefail

rust_version="$(cat "ci/rust-versions/stable.txt")"
rustup_args=("$rust_version" --profile minimal)

curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | \
sh -s -- -y --default-toolchain "${rustup_args[@]}"

. "$HOME/.cargo/env"

cargo fetch --locked
cargo build -p rsjsonnet --release --frozen

0 comments on commit 37db92f

Please sign in to comment.