Update CI
This commit is contained in:
parent
050ac4f5ad
commit
81a9998559
|
@ -10,14 +10,14 @@ jobs:
|
||||||
options: --security-opt seccomp=unconfined
|
options: --security-opt seccomp=unconfined
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout repository
|
- name: Checkout repository
|
||||||
uses: actions/checkout@v2
|
uses: actions/checkout@v3
|
||||||
|
|
||||||
- name: Generate code coverage
|
- name: Generate coverage report
|
||||||
run: |
|
run: |
|
||||||
cargo tarpaulin --verbose --features lua54,vendored,async,send,serialize,macros --out xml --exclude-files benches --exclude-files build --exclude-files mlua_derive --exclude-files src/ffi --exclude-files tests
|
cargo tarpaulin --verbose --features lua54,vendored,async,send,serialize,macros --out xml --exclude-files benches --exclude-files build --exclude-files mlua_derive --exclude-files src/ffi --exclude-files tests
|
||||||
|
|
||||||
- name: Upload to codecov.io
|
- name: Upload report to codecov.io
|
||||||
uses: codecov/codecov-action@v1
|
uses: codecov/codecov-action@v3
|
||||||
with:
|
with:
|
||||||
token: ${{secrets.CODECOV_TOKEN}}
|
token: ${{secrets.CODECOV_TOKEN}}
|
||||||
fail_ci_if_error: false
|
fail_ci_if_error: false
|
||||||
|
|
|
@ -7,34 +7,33 @@ jobs:
|
||||||
runs-on: ${{ matrix.os }}
|
runs-on: ${{ matrix.os }}
|
||||||
strategy:
|
strategy:
|
||||||
matrix:
|
matrix:
|
||||||
os: [ubuntu-20.04, macos-latest, windows-latest]
|
os: [ubuntu-22.04, macos-latest, windows-latest]
|
||||||
rust: [stable]
|
rust: [stable]
|
||||||
lua: [lua54, lua53, lua52, lua51, luajit, luau]
|
lua: [lua54, lua53, lua52, lua51, luajit, luau]
|
||||||
include:
|
include:
|
||||||
- os: ubuntu-20.04
|
- os: ubuntu-22.04
|
||||||
target: x86_64-unknown-linux-gnu
|
target: x86_64-unknown-linux-gnu
|
||||||
- os: macos-latest
|
- os: macos-latest
|
||||||
target: x86_64-apple-darwin
|
target: x86_64-apple-darwin
|
||||||
- os: windows-latest
|
- os: windows-latest
|
||||||
target: x86_64-pc-windows-msvc
|
target: x86_64-pc-windows-msvc
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v2
|
- uses: actions/checkout@v3
|
||||||
- uses: actions-rs/toolchain@v1
|
- uses: dtolnay/rust-toolchain@stable
|
||||||
with:
|
with:
|
||||||
toolchain: ${{ matrix.rust }}
|
toolchain: ${{ matrix.rust }}
|
||||||
target: ${{ matrix.target }}
|
target: ${{ matrix.target }}
|
||||||
override: true
|
- uses: Swatinem/rust-cache@v2
|
||||||
- uses: Swatinem/rust-cache@v1
|
|
||||||
- name: Build ${{ matrix.lua }} vendored
|
- name: Build ${{ matrix.lua }} vendored
|
||||||
run: |
|
run: |
|
||||||
cargo build --features "${{ matrix.lua }},vendored"
|
cargo build --features "${{ matrix.lua }},vendored"
|
||||||
cargo build --features "${{ matrix.lua }},vendored,async,send,serialize,macros,parking_lot"
|
cargo build --features "${{ matrix.lua }},vendored,async,send,serialize,macros,parking_lot"
|
||||||
shell: bash
|
shell: bash
|
||||||
- name: Build ${{ matrix.lua }} pkg-config
|
- name: Build ${{ matrix.lua }} pkg-config
|
||||||
if: ${{ matrix.os == 'ubuntu-20.04' && matrix.lua != 'lua54' }}
|
if: ${{ matrix.os == 'ubuntu-22.04' }}
|
||||||
run: |
|
run: |
|
||||||
sudo apt-get update
|
sudo apt-get update
|
||||||
sudo apt-get install -y --no-install-recommends liblua5.3-dev liblua5.2-dev liblua5.1-0-dev libluajit-5.1-dev
|
sudo apt-get install -y --no-install-recommends liblua5.4-dev liblua5.3-dev liblua5.2-dev liblua5.1-0-dev libluajit-5.1-dev
|
||||||
cargo build --features "${{ matrix.lua }}"
|
cargo build --features "${{ matrix.lua }}"
|
||||||
|
|
||||||
build_aarch64_cross_macos:
|
build_aarch64_cross_macos:
|
||||||
|
@ -45,29 +44,27 @@ jobs:
|
||||||
matrix:
|
matrix:
|
||||||
lua: [lua54, lua53, lua52, lua51, luajit]
|
lua: [lua54, lua53, lua52, lua51, luajit]
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v2
|
- uses: actions/checkout@v3
|
||||||
- uses: actions-rs/toolchain@v1
|
- uses: dtolnay/rust-toolchain@stable
|
||||||
with:
|
with:
|
||||||
toolchain: stable
|
toolchain: stable
|
||||||
target: aarch64-apple-darwin
|
target: aarch64-apple-darwin
|
||||||
override: true
|
|
||||||
- name: Cross-compile
|
- name: Cross-compile
|
||||||
run: cargo build --target aarch64-apple-darwin --features "${{ matrix.lua }},vendored,async,send,serialize,macros,parking_lot"
|
run: cargo build --target aarch64-apple-darwin --features "${{ matrix.lua }},vendored,async,send,serialize,macros,parking_lot"
|
||||||
|
|
||||||
build_aarch64_cross_ubuntu:
|
build_aarch64_cross_ubuntu:
|
||||||
name: Cross-compile to aarch64-unknown-linux-gnu
|
name: Cross-compile to aarch64-unknown-linux-gnu
|
||||||
runs-on: ubuntu-20.04
|
runs-on: ubuntu-22.04
|
||||||
needs: build
|
needs: build
|
||||||
strategy:
|
strategy:
|
||||||
matrix:
|
matrix:
|
||||||
lua: [lua54, lua53, lua52, lua51, luajit]
|
lua: [lua54, lua53, lua52, lua51, luajit]
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v2
|
- uses: actions/checkout@v3
|
||||||
- uses: actions-rs/toolchain@v1
|
- uses: dtolnay/rust-toolchain@stable
|
||||||
with:
|
with:
|
||||||
toolchain: stable
|
toolchain: stable
|
||||||
target: aarch64-unknown-linux-gnu
|
target: aarch64-unknown-linux-gnu
|
||||||
override: true
|
|
||||||
- name: Install ARM compiler toolchain
|
- name: Install ARM compiler toolchain
|
||||||
run: |
|
run: |
|
||||||
sudo apt-get update
|
sudo apt-get update
|
||||||
|
@ -79,18 +76,17 @@ jobs:
|
||||||
|
|
||||||
build_armv7_cross_ubuntu:
|
build_armv7_cross_ubuntu:
|
||||||
name: Cross-compile to armv7-unknown-linux-gnueabihf
|
name: Cross-compile to armv7-unknown-linux-gnueabihf
|
||||||
runs-on: ubuntu-20.04
|
runs-on: ubuntu-22.04
|
||||||
needs: build
|
needs: build
|
||||||
strategy:
|
strategy:
|
||||||
matrix:
|
matrix:
|
||||||
lua: [lua54, lua53, lua52, lua51]
|
lua: [lua54, lua53, lua52, lua51]
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v2
|
- uses: actions/checkout@v3
|
||||||
- uses: actions-rs/toolchain@v1
|
- uses: dtolnay/rust-toolchain@stable
|
||||||
with:
|
with:
|
||||||
toolchain: stable
|
toolchain: stable
|
||||||
target: armv7-unknown-linux-gnueabihf
|
target: armv7-unknown-linux-gnueabihf
|
||||||
override: true
|
|
||||||
- name: Install ARM compiler toolchain
|
- name: Install ARM compiler toolchain
|
||||||
run: |
|
run: |
|
||||||
sudo apt-get update
|
sudo apt-get update
|
||||||
|
@ -106,23 +102,22 @@ jobs:
|
||||||
needs: build
|
needs: build
|
||||||
strategy:
|
strategy:
|
||||||
matrix:
|
matrix:
|
||||||
os: [ubuntu-20.04, macos-latest, windows-latest]
|
os: [ubuntu-22.04, macos-latest, windows-latest]
|
||||||
rust: [stable, nightly]
|
rust: [stable, nightly]
|
||||||
lua: [lua54, lua53, lua52, lua51, luajit, luajit52, luau]
|
lua: [lua54, lua53, lua52, lua51, luajit, luajit52, luau]
|
||||||
include:
|
include:
|
||||||
- os: ubuntu-20.04
|
- os: ubuntu-22.04
|
||||||
target: x86_64-unknown-linux-gnu
|
target: x86_64-unknown-linux-gnu
|
||||||
- os: macos-latest
|
- os: macos-latest
|
||||||
target: x86_64-apple-darwin
|
target: x86_64-apple-darwin
|
||||||
- os: windows-latest
|
- os: windows-latest
|
||||||
target: x86_64-pc-windows-msvc
|
target: x86_64-pc-windows-msvc
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v2
|
- uses: actions/checkout@v3
|
||||||
- uses: actions-rs/toolchain@v1
|
- uses: dtolnay/rust-toolchain@stable
|
||||||
with:
|
with:
|
||||||
toolchain: ${{ matrix.rust }}
|
toolchain: ${{ matrix.rust }}
|
||||||
target: ${{ matrix.target }}
|
target: ${{ matrix.target }}
|
||||||
override: true
|
|
||||||
- uses: Swatinem/rust-cache@v1
|
- uses: Swatinem/rust-cache@v1
|
||||||
- name: Run ${{ matrix.lua }} tests
|
- name: Run ${{ matrix.lua }} tests
|
||||||
run: |
|
run: |
|
||||||
|
@ -142,19 +137,18 @@ jobs:
|
||||||
needs: build
|
needs: build
|
||||||
strategy:
|
strategy:
|
||||||
matrix:
|
matrix:
|
||||||
os: [ubuntu-20.04]
|
os: [ubuntu-22.04]
|
||||||
rust: [nightly]
|
rust: [nightly]
|
||||||
lua: [lua54, lua53, lua52, lua51, luajit, luau]
|
lua: [lua54, lua53, lua52, lua51, luajit, luau]
|
||||||
include:
|
include:
|
||||||
- os: ubuntu-20.04
|
- os: ubuntu-22.04
|
||||||
target: x86_64-unknown-linux-gnu
|
target: x86_64-unknown-linux-gnu
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v2
|
- uses: actions/checkout@v3
|
||||||
- uses: actions-rs/toolchain@v1
|
- uses: dtolnay/rust-toolchain@stable
|
||||||
with:
|
with:
|
||||||
toolchain: ${{ matrix.rust }}
|
toolchain: ${{ matrix.rust }}
|
||||||
target: ${{ matrix.target }}
|
target: ${{ matrix.target }}
|
||||||
override: true
|
|
||||||
- uses: Swatinem/rust-cache@v1
|
- uses: Swatinem/rust-cache@v1
|
||||||
- name: Run ${{ matrix.lua }} tests with address sanitizer
|
- name: Run ${{ matrix.lua }} tests with address sanitizer
|
||||||
run: |
|
run: |
|
||||||
|
@ -168,21 +162,20 @@ jobs:
|
||||||
needs: build
|
needs: build
|
||||||
strategy:
|
strategy:
|
||||||
matrix:
|
matrix:
|
||||||
os: [ubuntu-20.04, macos-latest]
|
os: [ubuntu-22.04, macos-latest]
|
||||||
rust: [stable]
|
rust: [stable]
|
||||||
lua: [lua54, lua53, lua52, lua51, luajit]
|
lua: [lua54, lua53, lua52, lua51, luajit]
|
||||||
include:
|
include:
|
||||||
- os: ubuntu-20.04
|
- os: ubuntu-22.04
|
||||||
target: x86_64-unknown-linux-gnu
|
target: x86_64-unknown-linux-gnu
|
||||||
- os: macos-latest
|
- os: macos-latest
|
||||||
target: x86_64-apple-darwin
|
target: x86_64-apple-darwin
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v2
|
- uses: actions/checkout@v3
|
||||||
- uses: actions-rs/toolchain@v1
|
- uses: dtolnay/rust-toolchain@stable
|
||||||
with:
|
with:
|
||||||
toolchain: ${{ matrix.rust }}
|
toolchain: ${{ matrix.rust }}
|
||||||
target: ${{ matrix.target }}
|
target: ${{ matrix.target }}
|
||||||
override: true
|
|
||||||
- uses: Swatinem/rust-cache@v1
|
- uses: Swatinem/rust-cache@v1
|
||||||
- name: Run ${{ matrix.lua }} module tests
|
- name: Run ${{ matrix.lua }} module tests
|
||||||
run: |
|
run: |
|
||||||
|
@ -202,7 +195,7 @@ jobs:
|
||||||
shell: msys2 {0}
|
shell: msys2 {0}
|
||||||
steps:
|
steps:
|
||||||
- uses: msys2/setup-msys2@v2
|
- uses: msys2/setup-msys2@v2
|
||||||
- uses: actions/checkout@v2
|
- uses: actions/checkout@v3
|
||||||
- name: Install Rust & Lua
|
- name: Install Rust & Lua
|
||||||
run: |
|
run: |
|
||||||
pacman -S --noconfirm mingw-w64-x86_64-rust mingw-w64-x86_64-lua mingw-w64-x86_64-luajit mingw-w64-x86_64-pkg-config
|
pacman -S --noconfirm mingw-w64-x86_64-rust mingw-w64-x86_64-lua mingw-w64-x86_64-luajit mingw-w64-x86_64-pkg-config
|
||||||
|
@ -213,29 +206,27 @@ jobs:
|
||||||
|
|
||||||
rustfmt:
|
rustfmt:
|
||||||
name: Rustfmt
|
name: Rustfmt
|
||||||
runs-on: ubuntu-20.04
|
runs-on: ubuntu-22.04
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v2
|
- uses: actions/checkout@v3
|
||||||
- uses: actions-rs/toolchain@v1
|
- uses: dtolnay/rust-toolchain@stable
|
||||||
with:
|
with:
|
||||||
toolchain: stable
|
toolchain: stable
|
||||||
components: rustfmt
|
components: rustfmt
|
||||||
override: true
|
|
||||||
- run: cargo fmt -- --check
|
- run: cargo fmt -- --check
|
||||||
|
|
||||||
clippy:
|
clippy:
|
||||||
name: Clippy check
|
name: Clippy check
|
||||||
runs-on: ubuntu-20.04
|
runs-on: ubuntu-22.04
|
||||||
strategy:
|
strategy:
|
||||||
matrix:
|
matrix:
|
||||||
lua: [lua54, lua53, lua52, lua51, luajit, luau]
|
lua: [lua54, lua53, lua52, lua51, luajit, luau]
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v2
|
- uses: actions/checkout@v3
|
||||||
- uses: actions-rs/toolchain@v1
|
- uses: dtolnay/rust-toolchain@stable
|
||||||
with:
|
with:
|
||||||
toolchain: nightly
|
toolchain: nightly
|
||||||
components: clippy
|
components: clippy
|
||||||
override: true
|
|
||||||
- uses: actions-rs/clippy-check@v1
|
- uses: actions-rs/clippy-check@v1
|
||||||
with:
|
with:
|
||||||
token: ${{ secrets.GITHUB_TOKEN }}
|
token: ${{ secrets.GITHUB_TOKEN }}
|
||||||
|
|
Loading…
Reference in New Issue