Skip to content

Commit

Permalink
.o -> .a, aarch64 musl
Browse files Browse the repository at this point in the history
  • Loading branch information
Anton-4 authored Jul 19, 2024
1 parent 8137603 commit 3305747
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 11 deletions.
18 changes: 9 additions & 9 deletions .github/workflows/basic_cli_build_release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -62,14 +62,14 @@ jobs:
CARGO_BUILD_TARGET: x86_64-unknown-linux-musl
run: ./ci/build_basic_cli.sh linux_x86_64

- name: Save .rh, .rm and .o file
- name: Save .rh, .rm and .a file
uses: actions/upload-artifact@v4
with:
name: linux-x86_64-files
path: |
basic-cli/platform/metadata_linux-x64.rm
basic-cli/platform/linux-x64.rh
basic-cli/platform/linux-x64.o
basic-cli/platform/linux-x64.a
build-linux-arm64-files:
Expand All @@ -89,12 +89,12 @@ jobs:
CARGO_TARGET_AARCH64_UNKNOWN_LINUX_MUSL_RUSTFLAGS: "-Clink-self-contained=yes -Clinker=rust-lld"
run: ./ci/build_basic_cli.sh linux_arm64

- name: Save .o file
- name: Save .a file
uses: actions/upload-artifact@v4
with:
name: linux-arm64-files
path: |
basic-cli/platform/linux-arm64.o
basic-cli/platform/linux-arm64.a
build-macos-x86_64-files:
runs-on: [macos-12] # I expect the generated files to work on macOS 12 and up
Expand All @@ -107,15 +107,15 @@ jobs:

- run: ./ci/build_basic_cli.sh macos_x86_64

- name: Save .o files
- name: Save .a file
uses: actions/upload-artifact@v4
with:
name: macos-x86_64-files
path: |
basic-cli/platform/macos-x64.o
basic-cli/platform/macos-x64.a
build-macos-apple-silicon-files:
name: build apple silicon .o file
name: build apple silicon .a file
runs-on: [self-hosted, macOS, ARM64]
needs: [prepare]
steps:
Expand All @@ -126,12 +126,12 @@ jobs:

- run: ./ci/build_basic_cli.sh macos_apple_silicon

- name: Save macos-arm64.o file
- name: Save macos-arm64.a file
uses: actions/upload-artifact@v4
with:
name: macos-apple-silicon-files
path: |
basic-cli/platform/macos-arm64.o
basic-cli/platform/macos-arm64.a
create-release-archive:
needs: [build-linux-x86_64-files, build-linux-arm64-files, build-macos-x86_64-files, build-macos-apple-silicon-files]
Expand Down
9 changes: 7 additions & 2 deletions ci/build_basic_cli.sh
Original file line number Diff line number Diff line change
Expand Up @@ -45,8 +45,13 @@ roc version

cd basic-cli
if [[ "$OSTYPE" == "linux-gnu"* ]]; then
sed -i 's|target/release|target/x86_64-unknown-linux-musl/release|g' jump-start.sh
sed -i 's|target/release|target/x86_64-unknown-linux-musl/release|g' build.roc
if [[ $(uname -m) == "aarch64" ]]; then
target_arch="aarch64-unknown-linux-musl"
else
target_arch="x86_64-unknown-linux-musl"
fi
sed -i "s|target/release|target/$target_arch/release|g" jump-start.sh
sed -i "s|target/release|target/$target_arch/release|g" build.roc
fi
./jump-start.sh

Expand Down

0 comments on commit 3305747

Please sign in to comment.