Files
pebrel/.github/workflows/linux-lua.yml
T

108 lines
3.7 KiB
YAML

name: Full native tests
on:
workflow_dispatch:
workflow_call:
push:
# Releases call this entire workflow instead of duplicating branch-push jobs.
branches-ignore: ["release/**"]
paths:
- "**/*.rs"
- "scripts/**/*.py"
- "**/Cargo.toml"
- "Cargo.lock"
- "rust-toolchain.toml"
- ".github/workflows/linux-lua.yml"
- ".github/ci-profile.toml"
- ".github/actions/rust-cache/action.yml"
pull_request:
paths:
- "**/*.rs"
- "scripts/**/*.py"
- "**/Cargo.toml"
- "Cargo.lock"
- "rust-toolchain.toml"
- ".github/workflows/linux-lua.yml"
- ".github/ci-profile.toml"
- ".github/actions/rust-cache/action.yml"
permissions:
contents: read
jobs:
native-tests:
name: Tests (${{ matrix.os }})
strategy:
fail-fast: false
matrix:
os: [ubuntu-24.04, windows-2022, macos-26, macos-26-intel]
runs-on: ${{ matrix.os }}
timeout-minutes: 120
env:
PYTHONUTF8: "1"
CARGO_TERM_COLOR: always
RUST_BACKTRACE: "1"
RUST_TOOLCHAIN: "1.97.1"
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- uses: actions/setup-python@v5
with:
python-version: "3.13"
- name: Install native dependencies
if: runner.os == 'Linux'
run: |
sudo apt-get update
sudo apt-get install -y --no-install-recommends \
build-essential cmake pkg-config zsh libasound2-dev libdbus-1-dev libudev-dev \
libfontconfig1-dev libfreetype6-dev \
libegl1-mesa-dev libgl1-mesa-dev \
libwayland-dev libxkbcommon-dev libxkbcommon-x11-dev \
libx11-xcb-dev libxcb1-dev libxcb-render0-dev \
libxcb-shape0-dev libxcb-xfixes0-dev libxcb-xinput-dev libxcb-xkb-dev libxi-dev
- name: Require the AppKit SDK used by this PR
if: runner.os == 'macOS'
run: |
sdk_version="$(xcrun --sdk macosx --show-sdk-version)"
test "${sdk_version%%.*}" -ge 26
- uses: dtolnay/rust-toolchain@stable
with:
toolchain: "1.97.1"
- uses: ./.github/actions/rust-cache
id: rust-cache
with:
key: native
target: target/ci
legacy-key: ${{ runner.os == 'Windows' && 'windows' || runner.os == 'Linux' && 'linux' || 'macos' }}
- name: Prepare pinned Windows console runtime
if: runner.os == 'Windows'
shell: pwsh
run: ./scripts/prepare-windows-runtime.ps1 -Destination assets/windows/conhost
- name: Test complete workspace and native harness
run: python scripts/ci_native_tests.py
- name: Save compiled workload
if: ${{ always() && steps.rust-cache.outcome == 'success' && steps.rust-cache.outputs.cache-hit != 'true' }}
uses: actions/cache/save@v4
with:
path: target/ci
key: ${{ steps.rust-cache.outputs.cache-key }}
- name: Check source architecture
if: ${{ !cancelled() && runner.os == 'Linux' }}
run: python scripts/check_architecture.py
- name: Test translation and allocation contracts
if: ${{ !cancelled() && runner.os == 'Linux' }}
run: cargo test --locked --manifest-path tools/i18n-contract/Cargo.toml
- name: Check the release workspace
if: ${{ !cancelled() }}
run: cargo check --locked --workspace --release
- name: Upload native compilation timings
if: always()
uses: actions/upload-artifact@v4
with:
name: native-timings-${{ matrix.os }}
path: target/cargo-timings
if-no-files-found: warn
compression-level: 0
retention-days: 14