Skip to content

Commit

Permalink
Include non-simd platform in CI (#78)
Browse files Browse the repository at this point in the history
* try add apple silicon runner

* update ci

* add cross build on arm64 to ci

* update ci.yml

* update ci.yml

* increase build space for test step

* update ci.yml

* update ci.yml
  • Loading branch information
makspll authored Oct 10, 2023
1 parent e339545 commit 32eba12
Show file tree
Hide file tree
Showing 2 changed files with 38 additions and 12 deletions.
46 changes: 34 additions & 12 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,18 +10,19 @@ name: Check and Lint
jobs:
check:
name: Check
runs-on: ${{ matrix.os_and_lua.os }}
runs-on: ${{ matrix.run_args.os }}
strategy:
matrix:
os_and_lua: [
{os: windows-latest, lua: lua54},
{os: macOS-latest, lua: lua54},
{os: ubuntu-latest, lua: lua51},
{os: ubuntu-latest, lua: lua52},
{os: ubuntu-latest, lua: lua53},
{os: ubuntu-latest, lua: lua54},
{os: ubuntu-latest, lua: luajit},
{os: ubuntu-latest, lua: luajit52}
run_args: [
{os: windows-latest, lua: lua54, cross: null},
{os: macOS-latest, lua: lua54, cross: null},
{os: ubuntu-latest, lua: lua54, cross: aarch64-unknown-linux-gnu},
{os: ubuntu-latest, lua: lua51, cross: null},
{os: ubuntu-latest, lua: lua52, cross: null},
{os: ubuntu-latest, lua: lua53, cross: null},
{os: ubuntu-latest, lua: lua54, cross: null},
{os: ubuntu-latest, lua: luajit, cross: null},
{os: ubuntu-latest, lua: luajit52, cross: null}
]
steps:
- name: Install alsa and udev
Expand All @@ -34,10 +35,19 @@ jobs:
toolchain: stable
override: true
- uses: Swatinem/[email protected]
- uses: actions-rs/cargo@v1
# for x86 builds
- if: matrix.run_args.cross == null
uses: actions-rs/cargo@v1
with:
command: check
args: --workspace --features=${{ matrix.run_args.lua }},rhai,teal,lua_script_api,rhai_script_api
# for non x86 cross-compiled builds
- if: matrix.run_args.cross != null
uses: houseabsolute/actions-rust-cross@v0
with:
command: check
args: --workspace --features=${{ matrix.os_and_lua.lua }},rhai,teal,lua_script_api,rhai_script_api
target: ${{ matrix.run_args.cross }}
args: --workspace --features=${{ matrix.run_args.lua }},rhai,teal,lua_script_api,rhai_script_api

fmt:
name: Rustfmt
Expand Down Expand Up @@ -79,6 +89,18 @@ jobs:
name: Tests
runs-on: ubuntu-latest
steps:
- name: Maximize build space
uses: easimon/maximize-build-space@master
with:
root-reserve-mb: 512
swap-size-mb: 1024
remove-dotnet: 'true'
- name: Checkout
uses: actions/checkout@v3
- name: Build
run: |
echo "Free space:"
df -h
- name: Install alsa and udev
run: sudo apt-get update; sudo apt-get install --no-install-recommends libasound2-dev libudev-dev
- uses: actions/checkout@v2
Expand Down
4 changes: 4 additions & 0 deletions Cross.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
[target.aarch64-unknown-linux-gnu]
pre-build = [
"dpkg --add-architecture arm64 && apt-get -y update; apt-get -y install libasound2-dev:arm64 libudev-dev:arm64",
]

0 comments on commit 32eba12

Please sign in to comment.