mirror of
https://github.com/mlua-rs/mlua
synced 2026-06-08 16:05:43 +00:00
Move from circele-ci to github actions
This commit is contained in:
@@ -0,0 +1,151 @@
|
||||
name: CI
|
||||
on: [push, pull_request]
|
||||
|
||||
jobs:
|
||||
build:
|
||||
name: Build
|
||||
runs-on: ${{ matrix.os }}
|
||||
strategy:
|
||||
matrix:
|
||||
thing:
|
||||
- stable
|
||||
- macos-x86_64
|
||||
# - aarch64-linux
|
||||
- x86_64-msvc
|
||||
include:
|
||||
- thing: stable
|
||||
target: x86_64-unknown-linux-gnu
|
||||
rust: stable
|
||||
os: ubuntu-latest
|
||||
- thing: macos-x86_64
|
||||
target: x86_64-apple-darwin
|
||||
rust: stable
|
||||
os: macos-latest
|
||||
- thing: aarch64-linux
|
||||
target: aarch64-unknown-linux-gnu
|
||||
rust: stable
|
||||
os: ubuntu-latest
|
||||
- thing: x86_64-msvc
|
||||
target: x86_64-pc-windows-msvc
|
||||
rust: stable-x86_64-msvc
|
||||
os: windows-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v1
|
||||
- name: Install Rust (rustup)
|
||||
if: matrix.os != 'macos-latest'
|
||||
run: rustup update ${{ matrix.rust }} --no-self-update && rustup default ${{ matrix.rust }}
|
||||
shell: bash
|
||||
- name: Install Lua (ubuntu)
|
||||
if: matrix.os == 'ubuntu-latest'
|
||||
run: |
|
||||
sudo apt-get update -y
|
||||
sudo apt-get install -y --no-install-recommends liblua5.3-dev liblua5.2-dev liblua5.1-0-dev libluajit-5.1-dev
|
||||
- name: Install Rust (macos)
|
||||
if: matrix.os == 'macos-latest'
|
||||
run: |
|
||||
curl https://sh.rustup.rs | sh -s -- -y
|
||||
echo ::add-path::$HOME/.cargo/bin
|
||||
shell: bash
|
||||
- name: Install GCC (aarch64-linux)
|
||||
run: |
|
||||
sudo apt-get update -y
|
||||
sudo apt-get install -y --no-install-recommends gcc-aarch64-linux-gnu libc6-dev-arm64-cross
|
||||
if: matrix.thing == 'aarch64-linux'
|
||||
shell: bash
|
||||
- run: rustup target add ${{ matrix.target }}
|
||||
- name: Build (Lua 5.1/5.2/5.3 and LuaJIT vendored)
|
||||
run: |
|
||||
for FEATURE in lua51 lua52 lua53; do
|
||||
echo "Building $FEATURE"
|
||||
cargo build --target ${{ matrix.target }} --release --no-default-features --features "$FEATURE lua-vendored"
|
||||
done
|
||||
echo "Building luajit"
|
||||
cargo build --target ${{ matrix.target }} --release --no-default-features --features "luajit luajit-vendored"
|
||||
shell: bash
|
||||
- name: Build (Lua 5.1/5.2/5.3 and LuaJIT via pkg-config)
|
||||
if: matrix.os == 'ubuntu-latest'
|
||||
run: |
|
||||
for FEATURE in lua51 lua52 lua53; do
|
||||
echo "Building $FEATURE"
|
||||
cargo build --target ${{ matrix.target }} --release --no-default-features --features $FEATURE
|
||||
done
|
||||
echo "Building luajit"
|
||||
cargo build --target ${{ matrix.target }} --release --no-default-features --features luajit
|
||||
shell: bash
|
||||
|
||||
test_linux:
|
||||
name: Test on Linux
|
||||
runs-on: ubuntu-latest
|
||||
needs: build
|
||||
steps:
|
||||
- uses: actions/checkout@v1
|
||||
- name: Install Rust
|
||||
run: rustup update stable --no-self-update && rustup default stable
|
||||
shell: bash
|
||||
- name: Run tests (Lua 5.3 vendored)
|
||||
run: cargo test --release --no-default-features --features "lua53 lua-vendored"
|
||||
shell: bash
|
||||
- name: Run tests (Lua 5.2 vendored)
|
||||
run: cargo test --release --no-default-features --features "lua53 lua-vendored"
|
||||
shell: bash
|
||||
- name: Run tests (Lua 5.1 vendored)
|
||||
run: cargo test --release --no-default-features --features "lua53 lua-vendored"
|
||||
shell: bash
|
||||
- name: Run tests (LuaJIT vendored)
|
||||
run: cargo test --release --no-default-features --features "luajit luajit-vendored"
|
||||
shell: bash
|
||||
|
||||
test_macos:
|
||||
name: Test on MacOS
|
||||
runs-on: macos-latest
|
||||
needs: build
|
||||
steps:
|
||||
- uses: actions/checkout@v1
|
||||
- name: Install Rust
|
||||
run: |
|
||||
curl https://sh.rustup.rs | sh -s -- -y
|
||||
echo ::add-path::$HOME/.cargo/bin
|
||||
shell: bash
|
||||
- name: Run tests (Lua 5.3 vendored)
|
||||
run: cargo test --release --no-default-features --features "lua53 lua-vendored"
|
||||
shell: bash
|
||||
- name: Run tests (Lua 5.2 vendored)
|
||||
run: cargo test --release --no-default-features --features "lua53 lua-vendored"
|
||||
shell: bash
|
||||
- name: Run tests (Lua 5.1 vendored)
|
||||
run: cargo test --release --no-default-features --features "lua53 lua-vendored"
|
||||
shell: bash
|
||||
- name: Run tests (LuaJIT vendored)
|
||||
run: cargo test --release --no-default-features --features "luajit luajit-vendored"
|
||||
shell: bash
|
||||
|
||||
test_windows:
|
||||
name: Test on Windows
|
||||
runs-on: windows-latest
|
||||
needs: build
|
||||
steps:
|
||||
- uses: actions/checkout@v1
|
||||
- name: Install Rust
|
||||
run: rustup update stable --no-self-update && rustup default stable
|
||||
shell: bash
|
||||
- name: Run tests (Lua 5.3 vendored)
|
||||
run: cargo test --release --no-default-features --features "lua53 lua-vendored"
|
||||
shell: bash
|
||||
- name: Run tests (Lua 5.2 vendored)
|
||||
run: cargo test --release --no-default-features --features "lua53 lua-vendored"
|
||||
shell: bash
|
||||
- name: Run tests (Lua 5.1 vendored)
|
||||
run: cargo test --release --no-default-features --features "lua53 lua-vendored"
|
||||
shell: bash
|
||||
- name: Run tests (LuaJIT vendored)
|
||||
run: cargo test --release --no-default-features --features "luajit luajit-vendored"
|
||||
shell: bash
|
||||
|
||||
rustfmt:
|
||||
name: Rustfmt
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v1
|
||||
- name: Install Rust
|
||||
run: rustup update stable && rustup default stable && rustup component add rustfmt
|
||||
- run: cargo fmt -- --check
|
||||
Reference in New Issue
Block a user