CI / Formatação e clippy (push) Successful in 1m9s
CI / Auditoria de dependências (push) Successful in 12s
CI / Testes (Linux) (push) Successful in 1m34s
Release / Cria a release (push) Successful in 5s
CI / Compila o app desktop (Linux) (push) Successful in 1m36s
Release / CLI (linux-aarch64) (push) Successful in 1m23s
Release / CLI (linux-x86_64) (push) Successful in 1m40s
Release / App desktop (linux-aarch64) (push) Successful in 7m32s
Release / App desktop (linux-x86_64) (push) Failing after 9m5s
Release / App desktop (windows) (push) Failing after 6m20s
89 lines
3.5 KiB
YAML
89 lines
3.5 KiB
YAML
name: CI
|
|
|
|
on:
|
|
# Mudança só de documentação ou estado de ferramentas não precisa dos jobs de CI.
|
|
push:
|
|
branches: [main]
|
|
paths-ignore: ['**.md', 'docs/**', 'LICENSE*', '.gitignore', '.githooks/**', '.wolf/**', '.claude/**', '.opencode/**', '.codex/**', '.cursor/**', '.superpowers/**', '.superset/**', '.gitea/ISSUE_TEMPLATE/**', 'scripts/release-notes.sh', 'scripts/release-upload.sh', '.gitea/workflows/release.yml']
|
|
pull_request:
|
|
paths-ignore: ['**.md', 'docs/**', 'LICENSE*', '.gitignore', '.githooks/**', '.wolf/**', '.claude/**', '.opencode/**', '.codex/**', '.cursor/**', '.superpowers/**', '.superset/**', '.gitea/ISSUE_TEMPLATE/**', 'scripts/release-notes.sh', 'scripts/release-upload.sh', '.gitea/workflows/release.yml']
|
|
|
|
concurrency:
|
|
group: ci-${{ gitea.ref }}
|
|
cancel-in-progress: true
|
|
|
|
env:
|
|
CARGO_TERM_COLOR: always
|
|
RUSTFLAGS: -D warnings
|
|
# O runner mantém /opt/hostedtoolcache num volume que sobrevive entre jobs:
|
|
# a toolchain do rustup, o registry do cargo, caches de npm/apt e o diretório
|
|
# target ficam ali, então nada disso é baixado ou recompilado do zero. Cada job
|
|
# usa o seu próprio target (flags diferentes invalidariam o de outro job).
|
|
CARGO_HOME: /opt/hostedtoolcache/cargo
|
|
RUSTUP_HOME: /opt/hostedtoolcache/rustup
|
|
NPM_CONFIG_CACHE: /opt/hostedtoolcache/npm-cache
|
|
|
|
jobs:
|
|
lint:
|
|
name: Formatação e clippy
|
|
runs-on: ubuntu-latest
|
|
env:
|
|
CARGO_TARGET_DIR: /opt/hostedtoolcache/cargo-target/sabia-lint
|
|
steps:
|
|
- uses: actions/checkout@v7
|
|
- uses: dtolnay/rust-toolchain@stable
|
|
with:
|
|
components: rustfmt, clippy
|
|
- uses: actions/setup-node@v7
|
|
with:
|
|
node-version: 22
|
|
- name: Cobertura da tradução da interface
|
|
run: node scripts/check-ui-i18n.mjs
|
|
- run: cargo fmt --all -- --check
|
|
- run: cargo clippy --workspace --all-targets
|
|
|
|
# Windows e macOS saem: o Gitea aqui tem um único runner, Linux arm64.
|
|
test:
|
|
name: Testes (Linux)
|
|
runs-on: ubuntu-latest
|
|
env:
|
|
CARGO_TARGET_DIR: /opt/hostedtoolcache/cargo-target/sabia-test
|
|
steps:
|
|
- uses: actions/checkout@v7
|
|
- uses: dtolnay/rust-toolchain@stable
|
|
- run: cargo test --workspace
|
|
|
|
audit:
|
|
name: Auditoria de dependências
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- uses: actions/checkout@v7
|
|
- uses: dtolnay/rust-toolchain@stable
|
|
# rustsec/audit-check depends on GitHub's checks API. cargo-audit itself
|
|
# needs nothing but the advisory database, and installing it once into the
|
|
# persistent CARGO_HOME makes every later run skip the compile.
|
|
- name: cargo audit
|
|
run: |
|
|
command -v cargo-audit >/dev/null || cargo install cargo-audit --locked
|
|
cargo audit
|
|
|
|
gui:
|
|
name: Compila o app desktop (Linux)
|
|
runs-on: ubuntu-latest
|
|
env:
|
|
CARGO_TARGET_DIR: /opt/hostedtoolcache/cargo-target/sabia-gui
|
|
steps:
|
|
- uses: actions/checkout@v7
|
|
- uses: dtolnay/rust-toolchain@stable
|
|
- uses: actions/setup-node@v7
|
|
with:
|
|
node-version: 22
|
|
- name: Dependências do Tauri
|
|
timeout-minutes: 25
|
|
run: scripts/apt-install.sh /opt/hostedtoolcache/apt-cache/tauri-native libwebkit2gtk-4.1-dev libayatana-appindicator3-dev librsvg2-dev patchelf
|
|
- name: Gera os ícones
|
|
run: npx --yes @tauri-apps/cli@2 icon apps/gui/src-tauri/icons/source.png -o apps/gui/src-tauri/icons
|
|
- run: cargo check --manifest-path apps/gui/src-tauri/Cargo.toml
|
|
env:
|
|
RUSTFLAGS: ""
|