Skip to content

Commit

Permalink
Use Musl on Linux (#81)
Browse files Browse the repository at this point in the history
**Problem**
Bionic vs Jammy situation.
  • Loading branch information
eed3si9n authored Jul 20, 2023
1 parent 1172b1c commit 8cbdcdb
Show file tree
Hide file tree
Showing 3 changed files with 30 additions and 1 deletion.
13 changes: 13 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,20 @@ jobs:
- uses: actions-rs/toolchain@v1
with:
toolchain: stable
- if: ${{ runner.os == 'Linux' }}
uses: awalsh128/cache-apt-pkgs-action@v1
with:
packages: musl-tools # provides musl-gcc
version: 1.0
- run: rustup component add rustfmt
- if: ${{ runner.os == 'Linux' }}
run: rustup target add x86_64-unknown-linux-musl
- name: setup JDK
uses: actions/setup-java@v3
with:
distribution: temurin
java-version: 8
cache: sbt
- name: Prepare output
run: ./.github/ci_scripts/prepare_output.sh bzl-gen-build-${{ matrix.platform }}.tgz staging-directory
- uses: actions/upload-artifact@master
Expand Down
13 changes: 13 additions & 0 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,20 @@ jobs:
- uses: actions-rs/toolchain@v1
with:
toolchain: stable
- if: ${{ runner.os == 'Linux' }}
uses: awalsh128/cache-apt-pkgs-action@v1
with:
packages: musl-tools # provides musl-gcc
version: 1.0
- run: rustup component add rustfmt
- if: ${{ runner.os == 'Linux' }}
run: rustup target add x86_64-unknown-linux-musl
- name: setup JDK
uses: actions/setup-java@v3
with:
distribution: temurin
java-version: 8
cache: sbt
- run: cd crates; cargo test --all-features
- run: cd crates; cargo test
- run: cd language_generators/scala-defref-extractor; ./sbt "test; scalafmtCheckAll"
Expand Down
5 changes: 4 additions & 1 deletion prepare_all_apps.sh
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
#!/bin/bash -ex

if [ -n "$MACOS_ARM64_BUILD" ]; then
if [[ "$(uname -s)" == "Linux" ]]; then
export CARGO_EXTRA_ARGS="--target=x86_64-unknown-linux-musl"
export RUST_TARGET_DIR="target/x86_64-unknown-linux-musl/release"
elif [[ -n "$MACOS_ARM64_BUILD" ]]; then
export SDKROOT=$(xcrun -sdk macosx --show-sdk-path)
export MACOSX_DEPLOYMENT_TARGET=$(xcrun -sdk macosx --show-sdk-platform-version)
export CARGO_EXTRA_ARGS="--target=aarch64-apple-darwin"
Expand Down

0 comments on commit 8cbdcdb

Please sign in to comment.