Skip to content

Commit 0e73ae1

Browse files
committed
Update CI
1 parent e62fd40 commit 0e73ae1

File tree

2 files changed

+66
-44
lines changed

2 files changed

+66
-44
lines changed

.github/workflows/main.yml

Lines changed: 65 additions & 43 deletions
Original file line numberDiff line numberDiff line change
@@ -32,10 +32,73 @@ jobs:
3232
- name: Build ${{ matrix.lua }} pkg-config
3333
if: ${{ matrix.os == 'ubuntu-18.04' && matrix.lua != 'lua54' }}
3434
run: |
35-
sudo apt-get update -y
35+
sudo apt-get update
3636
sudo apt-get install -y --no-install-recommends liblua5.3-dev liblua5.2-dev liblua5.1-0-dev libluajit-5.1-dev
3737
cargo build --release --features "${{ matrix.lua }}"
3838
39+
build_aarch64_cross_macos:
40+
name: Cross-compile to aarch64-apple-darwin
41+
runs-on: macos-11.0
42+
needs: build
43+
strategy:
44+
matrix:
45+
lua: [lua54, lua53, lua52, lua51, luajit]
46+
steps:
47+
- uses: actions/checkout@v2
48+
- uses: actions-rs/toolchain@v1
49+
with:
50+
toolchain: nightly
51+
target: aarch64-apple-darwin
52+
override: true
53+
- name: Cross-compile
54+
run: cargo build --target aarch64-apple-darwin --features "${{ matrix.lua }} async send serialize vendored"
55+
56+
build_aarch64_cross_ubuntu:
57+
name: Cross-compile to aarch64-unknown-linux-gnu
58+
runs-on: ubuntu-18.04
59+
needs: build
60+
strategy:
61+
matrix:
62+
lua: [lua54, lua53, lua52, lua51, luajit]
63+
steps:
64+
- uses: actions/checkout@v2
65+
- uses: actions-rs/toolchain@v1
66+
with:
67+
toolchain: nightly
68+
target: aarch64-unknown-linux-gnu
69+
override: true
70+
- name: Install ARM compiler toolchain
71+
run: |
72+
sudo apt-get update
73+
sudo apt-get install -y --no-install-recommends gcc-aarch64-linux-gnu libc6-dev-arm64-cross
74+
shell: bash
75+
- name: Cross-compile
76+
run: cargo build --target aarch64-unknown-linux-gnu --features "${{ matrix.lua }} async send serialize vendored"
77+
shell: bash
78+
79+
build_armv7_cross_ubuntu:
80+
name: Cross-compile to armv7-unknown-linux-gnueabihf
81+
runs-on: ubuntu-18.04
82+
needs: build
83+
strategy:
84+
matrix:
85+
lua: [lua54, lua53, lua52, lua51]
86+
steps:
87+
- uses: actions/checkout@v2
88+
- uses: actions-rs/toolchain@v1
89+
with:
90+
toolchain: nightly
91+
target: armv7-unknown-linux-gnueabihf
92+
override: true
93+
- name: Install ARM compiler toolchain
94+
run: |
95+
sudo apt-get update
96+
sudo apt-get install -y --no-install-recommends gcc-arm-linux-gnueabihf libc-dev-armhf-cross
97+
shell: bash
98+
- name: Cross-compile
99+
run: cargo build --target armv7-unknown-linux-gnueabihf --features "${{ matrix.lua }} async send serialize vendored"
100+
shell: bash
101+
39102
test:
40103
name: Test
41104
runs-on: ${{ matrix.os }}
@@ -72,47 +135,6 @@ jobs:
72135
TRYBUILD=overwrite cargo test --release --features "${{ matrix.lua }} vendored async send serialize" -- --ignored
73136
shell: bash
74137

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 libc-dev-armhf-cross
112-
- name: Cross compile
113-
run: cargo build --target armv7-unknown-linux-gnueabihf --features "${{ matrix.lua }} async send serialize vendored"
114-
shell: bash
115-
116138
test_luajit_macos:
117139
name: Test LuaJIT on macOS
118140
runs-on: macos-latest
@@ -135,7 +157,7 @@ jobs:
135157
shell: bash
136158

137159
test_modules:
138-
name: Test modules on Linux and macOS
160+
name: Test modules
139161
runs-on: ${{ matrix.os }}
140162
needs: build
141163
strategy:

Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@ erased-serde = { version = "0.3", optional = true }
5454
cc = { version = "1.0" }
5555
pkg-config = { version = "0.3.17" }
5656
lua-src = { version = ">= 540.0.0, < 550.0.0", optional = true }
57-
luajit-src = { version = ">= 210.1.0, < 220.0.0", optional = true }
57+
luajit-src = { version = ">= 210.1.2, < 220.0.0", optional = true }
5858

5959
[dev-dependencies]
6060
rustyline = "7.0"

0 commit comments

Comments
 (0)