mirror of
https://github.com/Myriad-Dreamin/tinymist.git
synced 2025-12-23 08:47:50 +00:00
Some checks are pending
tinymist::auto_tag / auto-tag (push) Waiting to run
tinymist::ci / Duplicate Actions Detection (push) Waiting to run
tinymist::ci / Check Clippy, Formatting, Completion, Documentation, and Tests (Linux) (push) Waiting to run
tinymist::ci / Check Minimum Rust version and Tests (Windows) (push) Waiting to run
tinymist::ci / prepare-build (push) Waiting to run
tinymist::ci / announce (push) Blocked by required conditions
tinymist::ci / build (push) Blocked by required conditions
tinymist::gh_pages / build-gh-pages (push) Waiting to run
134 lines
4.3 KiB
YAML
134 lines
4.3 KiB
YAML
name: tinymist::ci
|
|
on:
|
|
push:
|
|
branches:
|
|
- main
|
|
- nightly
|
|
tags:
|
|
- "*"
|
|
pull_request:
|
|
types: [opened, synchronize]
|
|
branches:
|
|
- main
|
|
- nightly
|
|
workflow_dispatch:
|
|
|
|
env:
|
|
RUSTFLAGS: '-Dwarnings'
|
|
CARGO_TARGET_AARCH64_UNKNOWN_LINUX_GNU_LINKER: aarch64-linux-gnu-gcc
|
|
CARGO_TARGET_ARM_UNKNOWN_LINUX_GNUEABIHF_LINKER: arm-linux-gnueabihf-gcc
|
|
|
|
jobs:
|
|
pre_build:
|
|
permissions:
|
|
actions: write
|
|
contents: read
|
|
name: Duplicate Actions Detection
|
|
runs-on: ubuntu-latest
|
|
outputs:
|
|
should_skip: ${{ steps.skip_check.outputs.should_skip }}
|
|
steps:
|
|
- id: skip_check
|
|
uses: fkirc/skip-duplicate-actions@v5
|
|
with:
|
|
cancel_others: "true"
|
|
|
|
checks-linux:
|
|
name: Check Clippy, Formatting, Completion, Documentation, and Tests (Linux)
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- uses: actions/checkout@v4
|
|
- uses: typst-community/setup-typst@v4
|
|
- uses: actions-rust-lang/setup-rust-toolchain@v1
|
|
with:
|
|
components: clippy, rustfmt
|
|
- name: Install Node.js
|
|
uses: actions/setup-node@v4
|
|
with:
|
|
node-version: 22
|
|
cache: 'yarn'
|
|
- name: Install deps
|
|
run: yarn install
|
|
- name: Check and build assets
|
|
run: |
|
|
yarn build:preview
|
|
yarn build:l10n
|
|
- run: cargo clippy --workspace --all-targets
|
|
- run: scripts/feature-testing.sh
|
|
- run: cargo fmt --check --all
|
|
- run: cargo doc --workspace --no-deps
|
|
- run: yarn build:typlite
|
|
- run: node ./scripts/link-docs.mjs --check
|
|
- name: Generate completions
|
|
run: |
|
|
mkdir -p completions/{zsh,bash,fish/vendor_completions.d,elvish/lib,nushell/vendor/autoload,powershell}/
|
|
cargo run -p tinymist -- completion zsh > completions/zsh/_tinymist
|
|
cargo run -p tinymist -- completion bash > completions/bash/tinymist
|
|
cargo run -p tinymist -- completion fish > completions/fish/vendor_completions.d/tinymist.fish
|
|
cargo run -p tinymist -- completion elvish > completions/elvish/lib/tinymist.elv
|
|
cargo run -p tinymist -- completion nushell > completions/nushell/vendor/autoload/tinymist.nu
|
|
cargo run -p tinymist -- completion powershell > completions/powershell/tinymist.ps1
|
|
tar -czvf tinymist-completions.tar.gz completions
|
|
- name: upload completions
|
|
uses: actions/upload-artifact@v4
|
|
with:
|
|
name: tinymist-completion-scripts
|
|
path: tinymist-completions.tar.gz
|
|
- name: Test tinymist
|
|
run: cargo test --workspace -- --skip=e2e
|
|
|
|
checks-windows:
|
|
name: Check Minimum Rust version and Tests (Windows)
|
|
runs-on: windows-latest
|
|
steps:
|
|
- uses: actions/checkout@v4
|
|
- uses: actions-rust-lang/setup-rust-toolchain@v1
|
|
with:
|
|
toolchain: 1.85.0 # check-min-version
|
|
- name: Install Node.js
|
|
uses: actions/setup-node@v4
|
|
with:
|
|
node-version: 22
|
|
- name: Install deps
|
|
run: yarn install
|
|
- name: Check Rust Version
|
|
run: yarn check-msrv
|
|
- name: Check and build assets
|
|
run: |
|
|
yarn build:preview
|
|
yarn build:l10n
|
|
- run: cargo check --workspace
|
|
- name: Test tinymist
|
|
run: cargo test --workspace -- --skip=e2e
|
|
|
|
prepare-build:
|
|
runs-on: "ubuntu-latest"
|
|
outputs:
|
|
tag: ${{ steps.tag.outputs.tag }}
|
|
steps:
|
|
- uses: actions/checkout@v4
|
|
- id: tag # get the tag from package.json
|
|
run:
|
|
echo "tag=$(jq -r '.version' editors/vscode/package.json)" >> $GITHUB_OUTPUT
|
|
- name: Show tag
|
|
run: echo "Tag is ${{ steps.tag.outputs.tag }}"
|
|
|
|
announce:
|
|
needs: [prepare-build]
|
|
permissions:
|
|
contents: write
|
|
uses: ./.github/workflows/announce.yml
|
|
if: ${{ startsWith(github.ref, 'refs/tags/') }}
|
|
secrets: inherit
|
|
with:
|
|
tag: ${{ needs.prepare-build.outputs.tag }}
|
|
|
|
build:
|
|
needs: [prepare-build] # , announce
|
|
permissions:
|
|
contents: write
|
|
uses: ./.github/workflows/release.yml
|
|
secrets: inherit
|
|
with:
|
|
tag: ${{ (startsWith(github.ref, 'refs/tags/') && needs.prepare-build.outputs.tag) || '' }}
|
|
targets: ${{ (!startsWith(github.ref, 'refs/tags/') && 'aarch64-apple-darwin,x86_64-pc-windows-msvc,x86_64-unknown-linux-gnu') || 'all' }}
|