Skip to content

Commit 84003f3

Browse files
committed
Add CI for cross compilation cases
1 parent e0d9ec4 commit 84003f3

File tree

1 file changed

+41
-0
lines changed

1 file changed

+41
-0
lines changed

.github/workflows/main.yml

Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -72,6 +72,47 @@ jobs:
7272
TRYBUILD=overwrite cargo test --release --features "${{ matrix.lua }} vendored async send serialize" -- --ignored
7373
shell: bash
7474

75+
test_arm_cross_macos:
76+
name: Test Cross compilation for ARM from Intel on macOS
77+
runs-on: macos-11.0
78+
strategy:
79+
matrix:
80+
lua: [lua54, lua53, lua52, lua51]
81+
steps:
82+
- uses: actions/checkout@v2
83+
- uses: actions-rs/toolchain@v1
84+
with:
85+
toolchain: nightly
86+
target: x86_64-apple-darwin
87+
override: true
88+
- name: Add ARM target
89+
run: rustup target add aarch64-apple-darwin
90+
- name: Cross compile
91+
run: cargo build --target aarch64-apple-darwin --features "${{ matrix.lua }} async send serialize vendored"
92+
93+
test_arm_cross_ubuntu:
94+
name: Test cross compilation for ARM from Intel on Linux
95+
runs-on: ubuntu-18.04
96+
strategy:
97+
matrix:
98+
lua: [lua54, lua53, lua52, lua51]
99+
steps:
100+
- uses: actions/checkout@v2
101+
- uses: actions-rs/toolchain@v1
102+
with:
103+
toolchain: nightly
104+
target: x86_64-unknown-linux-gnu
105+
override: true
106+
- name: Add ARM target
107+
run: rustup target add armv7-unknown-linux-gnueabihf
108+
- name: Install ARM compiler toolchain
109+
run: |
110+
sudo apt-get update -y
111+
sudo apt-get install -y --no-install-recommends gcc-arm-linux-gnueabihf
112+
- name: Cross compile
113+
run: cargo build --target armv7-unknown-linux-gnueabihf --features "${{ matrix.lua }} async send serialize vendored"
114+
shell: bash
115+
75116
test_luajit_macos:
76117
name: Test LuaJIT on macOS
77118
runs-on: macos-latest

0 commit comments

Comments
 (0)