Skip to content

Commit

Permalink
More scripts.
Browse files Browse the repository at this point in the history
  • Loading branch information
csasarak committed Aug 27, 2024
1 parent ec81b5b commit 37e210f
Show file tree
Hide file tree
Showing 3 changed files with 41 additions and 30 deletions.
26 changes: 13 additions & 13 deletions .github/workflows/build-all.yml
Original file line number Diff line number Diff line change
Expand Up @@ -85,20 +85,20 @@ jobs:
# Linux builds are run in Alpine, which builds them statically;
# using jemalloc reduces the performance impact of this
# over the default libc allocator (which performs very poorly in static builds).
# - name: Build Rust dependencies (Linux)
# if: ${{ matrix.os-name == 'Linux') }}
# run: |
# cargo build --release
- name: Build Rust dependencies (Linux)
if: ${{ matrix.os-name == 'Linux') }}
run: |
cargo build --features jemalloc --release
# # Non-Linux environments generally don't need `jemalloc`
# # and in particular Windows doesn't support it.
# - name: Build Rust dependencies (non-Linux)
# if: ${{ ! contains(matrix.os-name, 'linux') }}
# run: cargo build --release
# Non-Linux environments generally don't need `jemalloc`
# and in particular Windows doesn't support it.
- name: Build Rust dependencies (non-Linux)
if: ${{ ! contains(matrix.os-name, 'linux') }}
run: cargo build --release

# # Run tests in release mode to reduce the need for rebuilds.
# - name: Test Rust dependencies
# run: cargo nextest run --release
# Run tests in release mode to reduce the need for rebuilds.
- name: Test Rust dependencies
run: cargo nextest run --release

- name: Ensure git ownership check does not lead to compiler error
run: git config --global --add safe.directory "$GITHUB_WORKSPACE"
Expand Down Expand Up @@ -158,7 +158,7 @@ jobs:
if: ${{ matrix.os == 'LinuxARM' }}
uses: docker://fossa/haskell-static-alpine:ghc-9.8.2
with:
args: ./.github/workflows/scripts/build.sh ${{ runner.os }} ${{ matrix.project-file }}
args: ./.github/workflows/scripts/build-arm.sh ${{ runner.os }} ${{ matrix.project-file }}

- name: Build and Unit Test
if: ${{ matrix.os != 'LinuxARM' }}
Expand Down
27 changes: 27 additions & 0 deletions .github/workflows/scripts/build-arm.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
#!/usr/bin/env sh

set -e
set -x

if [ $# -lt 2 ] ; then
echo "Usage: ./build-arm.sh <RUNNER OS> <PROJECT FILE>"
exit 1
fi

RUNNER_OS=$1
PROJECT_FILE=$2

# Install rust tooling
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- --profile minimal
cargo install nextest

rustc -V
cargo -V

# Build Rust binaries
cargo build --release

cargo nextest run --release

# Now do Haskell things
./build.sh "$RUNNER_OS" "$PROJECT_FILE"
18 changes: 1 addition & 17 deletions .github/workflows/scripts/build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -4,26 +4,10 @@ set -e
set -x

if [ $# -lt 2 ] ; then
echo "Usage: ./compute_cache_key <RUNNER OS> <PROJECT FILE>"
echo "Usage: ./build.sh <RUNNER OS> <PROJECT FILE>"
exit 1
fi

RUNNER_OS=$1
PROJECT_FILE=$2

# Install rust tooling
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- --profile minimal
cargo install nextest

rustc -V
cargo -V

# Build Rust binaries
cargo build --release

cargo nextest run --release

# Now do Haskell things

make build-test-data

Expand Down

0 comments on commit 37e210f

Please sign in to comment.