Skip to content

ci......

ci...... #209

Workflow file for this run

name: CI # Continuous Integration
on:
push:
branches:
- main
pull_request:
jobs:
test:
name: Run [${{ matrix.action }} | ${{ matrix.config.name }}]
runs-on: ${{ matrix.config.os }}
strategy:
fail-fast: false
matrix:
action:
- build
# - test
config:
- { name: Linux (x86), os: ubuntu-latest, target: "x86_64-unknown-linux-gnu" }
- { name: Linux (ARM), os: ubuntu-latest, target: "aarch64-unknown-linux-gnu" }
- { name: MacOS (x86), os: macos-latest, target: "x86_64-apple-darwin" }
- { name: MacOS (ARM), os: macos-latest, target: "aarch64-apple-darwin" }
- { name: Windows (x86), os: windows-latest, target: "x86_64-pc-windows-msvc" }
steps:
- name: get cmake
uses: lukka/get-cmake@latest
- name: Install LLVM and Clang on mac
uses: KyleMayes/install-llvm-action@v1
if: matrix.config.target == "x86_64-apple-darwin" || matrix.config.target == "aarch64-apple-darwin"

Check failure on line 30 in .github/workflows/ci.yml

View workflow run for this annotation

GitHub Actions / CI

Invalid workflow file

The workflow is not valid. .github/workflows/ci.yml (Line: 30, Col: 13): Unexpected symbol: '"x86_64-apple-darwin"'. Located at position 25 within expression: matrix.config.target == "x86_64-apple-darwin" || matrix.config.target == "aarch64-apple-darwin" .github/workflows/ci.yml (Line: 35, Col: 13): Unexpected symbol: '"x86_64-apple-darwin"'. Located at position 25 within expression: matrix.config.target != "x86_64-apple-darwin" && matrix.config.target != "aarch64-apple-darwin"
with:
version: "13"
- name: Install LLVM and Clang
uses: KyleMayes/install-llvm-action@v1
if: matrix.config.target != "x86_64-apple-darwin" && matrix.config.target != "aarch64-apple-darwin"
with:
version: "16"
- name: Checkout repository
uses: actions/checkout@v4
with:
submodules: true
targets: ${{ matrix.config.target }}
- name: Setup aarch64
if: matrix.config.target == 'aarch64-unknown-linux-gnu'
run: |
sudo apt update
sudo apt install gcc-aarch64-linux-gnu
echo "[target.aarch64-unknown-linux-gnu]" >> ~/.cargo/config
echo "linker = \"aarch64-linux-gnu-gcc\"" >> ~/.cargo/config
- name: Install Rust toolchain
uses: dtolnay/rust-toolchain@nightly
- uses: Swatinem/rust-cache@v2
- name: Build ymfm rust dingdong win # separate step so I can see earlier if CI fails..
if: matrix.config.target == "x86_64-pc-windows-msvc"
run: |
cd brainworms_farting_noises/libymfm.wasm
git submodule init
git submodule update
cmake -G "Visual Studio 17 2022" -T ClangCL -S . -B build
cmake --build build --parallel $(nproc)
cd ../..
- name: Build ymfm rust dingdong not win # separate step so I can see earlier if CI fails..
if: matrix.config.target != "x86_64-pc-windows-msvc"
run: |
cd brainworms_farting_noises/libymfm.wasm
git submodule init
git submodule update
cmake -S . -B build
cmake --build build --parallel $(nproc)
cd ../..
- name: Build
if: matrix.action == 'build'
run: cargo build --all-features --workspace
# - name: Test
# if: matrix.action == 'test'
# run: cargo test --all-features --workspace
rustfmt:
name: Rustfmt
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v4
with:
submodules: true
- name: Install Rust toolchain
uses: dtolnay/rust-toolchain@nightly
with:
components: rustfmt
- uses: Swatinem/rust-cache@v2
- name: Check formatting
run: |
sudo apt install cmake clang
cd brainworms_farting_noises/libymfm.wasm
git submodule init
git submodule update
cmake -DCMAKE_TOOLCHAIN_FILE=./cmake/x86-64.cmake -S . -B build
cmake --build build --parallel $(nproc)
cd ../..
cargo fmt --all --check
clippy:
name: Clippy
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v4
with:
submodules: true
- name: Install Rust toolchain
uses: dtolnay/rust-toolchain@nightly
with:
components: clippy
- uses: Swatinem/rust-cache@v2
- name: Clippy check
run: |
sudo apt install cmake clang
cd brainworms_farting_noises/libymfm.wasm
git submodule init
git submodule update
cmake -DCMAKE_TOOLCHAIN_FILE=./cmake/x86-64.cmake -S . -B build
cmake --build build --parallel $(nproc)
cd ../..
cargo clippy --all-features --workspace
# docs:
# name: Docs
# runs-on: ubuntu-latest
# steps:
# - name: Checkout repository
# uses: actions/checkout@v4
# with:
# submodules: true
# - name: Install Rust toolchain
# uses: dtolnay/rust-toolchain@nightly
# - uses: Swatinem/rust-cache@v2
# - name: Check documentation
# env:
# RUSTDOCFLAGS: -D warnings
# run: cargo doc --no-deps --document-private-items --all-features --workspace
hack:
name: Check
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
submodules: true
- name: Install nightly
uses: dtolnay/rust-toolchain@nightly
- name: cargo install cargo-hack
uses: taiki-e/install-action@cargo-hack
- uses: Swatinem/rust-cache@v2
- name: Check for all features
run: |
sudo apt install cmake clang
cd brainworms_farting_noises/libymfm.wasm
git submodule init
git submodule update
cmake -DCMAKE_TOOLCHAIN_FILE=./cmake/x86-64.cmake -S . -B build
cmake --build build --parallel $(nproc)
cd ../..
cargo hack --feature-powerset check
# wasm:
# name: Wasm
# runs-on: ubuntu-latest
# steps:
# - uses: actions/checkout@v4
# with:
# submodules: true
# - name: Install nightly
# uses: dtolnay/rust-toolchain@nightly
# with:
# target: wasm32-unknown-unknown
# - uses: Swatinem/rust-cache@v2
# - name: Check for target wasm webgpu
# env:
# RUSTFLAGS: --cfg=web_sys_unstable_apis
# run: cargo check --target wasm32-unknown-unknown
# - name: Check for target wasm webgl
# run: cargo check --target wasm32-unknown-unknown --features webgl