Skip to content

Commit 9b60d8a

Browse files
committed
Add precompilation for aarch64-unknown-linux-gnu
1 parent 8514d6b commit 9b60d8a

File tree

2 files changed

+66
-0
lines changed

2 files changed

+66
-0
lines changed

.github/workflows/release.yml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,11 @@ jobs:
1616
job:
1717
- { target: aarch64-apple-darwin, os: macos-latest }
1818
- { target: x86_64-unknown-linux-gnu, os: ubuntu-latest }
19+
- {
20+
target: aarch64-unknown-linux-gnu,
21+
os: ubuntu-latest,
22+
use-cross: true,
23+
}
1924

2025
steps:
2126
- name: Checkout source code

.github/workflows/test-build.yml

Lines changed: 61 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,61 @@
1+
name: Test Build (Branch)
2+
3+
on:
4+
push:
5+
branches:
6+
- test-aarch64-linux-target
7+
pull_request:
8+
branches:
9+
- test-aarch64-linux-target
10+
11+
jobs:
12+
test_build:
13+
name: Test NIF ${{ matrix.nif }} - ${{ matrix.job.target }} (${{ matrix.job.os }})
14+
runs-on: ${{ matrix.job.os }}
15+
strategy:
16+
fail-fast: false
17+
matrix:
18+
nif: ["2.15"]
19+
job:
20+
- { target: aarch64-apple-darwin, os: macos-latest }
21+
- { target: x86_64-unknown-linux-gnu, os: ubuntu-latest }
22+
- {
23+
target: aarch64-unknown-linux-gnu,
24+
os: ubuntu-latest,
25+
use-cross: true,
26+
}
27+
28+
steps:
29+
- name: Checkout source code
30+
uses: actions/checkout@v3
31+
with:
32+
submodules: recursive
33+
34+
- name: Extract crate information
35+
shell: bash
36+
run: |
37+
# Get the project version from mix.exs
38+
echo "PROJECT_VERSION=$(sed -n 's/^ @version "\(.*\)"/\1/p' mix.exs | head -n1)" >> $GITHUB_ENV
39+
40+
- name: Install Rust toolchain
41+
uses: dtolnay/rust-toolchain@stable
42+
with:
43+
target: ${{ matrix.job.target }}
44+
45+
- name: Build the project
46+
id: build-crate
47+
uses: philss/[email protected]
48+
with:
49+
nif-version: ${{ matrix.nif }}
50+
project-dir: "native/baml_elixir"
51+
project-name: baml_elixir
52+
project-version: ${{ env.PROJECT_VERSION }}
53+
target: ${{ matrix.job.target }}
54+
use-cross: ${{ matrix.job.use-cross }}
55+
56+
- name: Verify build artifact
57+
run: |
58+
echo "Build completed successfully for target: ${{ matrix.job.target }}"
59+
echo "Artifact path: ${{ steps.build-crate.outputs.file-path }}"
60+
echo "File name: ${{ steps.build-crate.outputs.file-name }}"
61+
ls -la "${{ steps.build-crate.outputs.file-path }}"

0 commit comments

Comments
 (0)