Skip to content

Fixed merging.

Fixed merging. #87

on:
push:
paths:
- '.github/workflows/code_validation.yml' # Run when this workflow changes
- '**/Cargo.toml' # Run when dependencies change
- '**/Cargo.lock' # Run when dependencies change
- '**/src/**'
pull_request:
paths:
- '.github/workflows/code_validation.yml' # Run when this workflow changes
- '**/Cargo.toml' # Run when dependencies change
- '**/Cargo.lock' # Run when dependencies change
- '**/src/**'
branches: [main]
workflow_dispatch: # Run when manually triggered
workflow_call: # Run when called by another workflow
name: βœ” Code Validation
jobs:
code_validation_job:
name: ${{ matrix.job_name }}
if: |
!startsWith(github.event.head_commit.message, 'chore:')
&& !startsWith(github.event.head_commit.message, 'chore(')
strategy:
fail-fast: false
matrix:
platform:
- linux
- windows
- apple
cpu_architecture:
- x86_64
- aarch64
subcommand:
- fmt
- clippy
- check
- test
# - doc
# - build
include:
- platform: linux
cicd_runner: ubuntu-latest
- platform: windows
cicd_runner: windows-latest
- platform: apple
cicd_runner: macos-latest
- use_cross: true
- compilation_target: x86_64-unknown-linux-gnu
cpu_architecture: x86_64
platform: linux
toolchain: gnu
use_cross: false
- compilation_target: x86_64-pc-windows-msvc
cpu_architecture: x86_64
platform: windows
toolchain: msvc
use_cross: false
- compilation_target: x86_64-apple-darwin
cpu_architecture: x86_64
platform: apple
toolchain: darwin
use_cross: false
- compilation_target: aarch64-unknown-linux-gnu
cpu_architecture: aarch64
platform: linux
toolchain: gnu
- compilation_target: aarch64-pc-windows-msvc
cpu_architecture: aarch64
platform: windows
toolchain: msvc
use_cross: false # No Cross image for this yet
- compilation_target: aarch64-apple-darwin
cpu_architecture: aarch64
platform: apple
toolchain: darwin
use_cross: false # No Cross image for this yet
- subcommand: fmt
job_name: πŸ“‘ Format Job
arguments: '--verbose -- --check'
- subcommand: clippy
job_name: πŸ“Ž Clippy Job
arguments: '--workspace -- -D warnings'
- subcommand: check
job_name: βœ… Check Job
arguments: '--workspace'
- subcommand: test
job_name: πŸ§ͺ Test Job
arguments: '--workspace'
# - subcommand: doc
# job_name: πŸ“œ Documentation Job
# arguments: '--workspace --all-features --no-deps --document-private-items'
# - subcommand: build
# job_name: πŸ”¨ Build Job
# arguments: '--workspace --all-features --release'
runs-on: ${{ matrix.cicd_runner }}
steps:
- name: ↕️ Install Ubuntu Dependencies Step
id: dependencies_install_step
if: ${{ matrix.compilation_target == 'x86_64-unknown-linux-gnu' }}
uses: awalsh128/cache-apt-pkgs-action@latest
with:
packages: libgtk-4-dev
version: 1.0
- name: ${{ matrix.job_name }}
id: task_step
uses: pax-hub/rust-github-action@main
with:
subcommand: ${{ matrix.subcommand }}
arguments: ${{ matrix.arguments }}
rust_release_channel: nightly
use_cross: ${{ matrix.use_cross }}
compilation_target: ${{ matrix.compilation_target }}