Skip to content

Commit

Permalink
Add workflows
Browse files Browse the repository at this point in the history
  • Loading branch information
mosuka committed Oct 27, 2024
1 parent 609b40e commit e8782ad
Show file tree
Hide file tree
Showing 4 changed files with 148 additions and 0 deletions.
12 changes: 12 additions & 0 deletions .github/FUNDING.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
# These are supported funding model platforms

github: [ mosuka ]
patreon: # Replace with a single Patreon username
open_collective: # Replace with a single Open Collective username
ko_fi: # Replace with a single Ko-fi username
tidelift: # Replace with a single Tidelift platform-name/package-name e.g., npm/babel
community_bridge: # Replace with a single Community Bridge project-name e.g., cloud-foundry
liberapay: # Replace with a single Liberapay username
issuehunt: # Replace with a single IssueHunt username
otechie: # Replace with a single Otechie username
custom: # Replace with up to 4 custom sponsorship URLs e.g., ['link1', 'link2']
15 changes: 15 additions & 0 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
# To get started with Dependabot version updates, you'll need to specify which
# package ecosystems to update and where the package manifests are located.
# Please see the documentation for all configuration options:
# https://help.github.com/github/administering-a-repository/configuration-options-for-dependency-updates

version: 2
updates:
- package-ecosystem: cargo
directory: /
schedule:
interval: daily
- package-ecosystem: github-actions
directory: /
schedule:
interval: daily
36 changes: 36 additions & 0 deletions .github/workflows/periodic.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
name: Periodic

on:
workflow_dispatch:
schedule:
- cron: 0 0 * * SUN

jobs:
test:
strategy:
matrix:
platform:
- runner: ubuntu-latest
target: x86_64-unknown-linux-gnu
- runner: macOS-latest
target: x86_64-apple-darwin
- runner: macOS-latest
target: aarch64-apple-darwin
- runner: windows-latest
target: x86_64-pc-windows-msvc
toolchain: [stable, beta, nightly]
features: ["ipadic", "ko-dic", "cc-cedict"]
runs-on: ${{ matrix.platform.runner }}
steps:
- name: Run checkout
uses: actions/checkout@v4

- name: Install toolchain
uses: dtolnay/rust-toolchain@v1
with:
toolchain: ${{ matrix.toolchain }}
target: ${{ matrix.platform.target }}
components: rustfmt, clippy

- name: Run test
run: cargo test --target "${{ matrix.platform.target }}" --features "${{ matrix.features }}"
85 changes: 85 additions & 0 deletions .github/workflows/regression.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,85 @@
name: Regression

on:
workflow_dispatch:
push:
branches:
- main
pull_request:
types: [opened, synchronize]

jobs:
fmt:
name: Format
strategy:
matrix:
platform:
- runner: ubuntu-latest
target: x86_64
toolchain: [stable]
features: ["ipadic", "ko-dic", "cc-cedict"]
runs-on: ${{ matrix.platform.runner }}
steps:
- name: Run checkout
uses: actions/checkout@v4

- name: Install toolchain
uses: dtolnay/rust-toolchain@v1
with:
toolchain: ${{ matrix.toolchain }}
components: rustfmt, clippy

- name: Check format
run: cargo fmt --all -- --check

check:
name: Check
strategy:
matrix:
platform:
- runner: ubuntu-latest
target: x86_64
toolchain: [stable]
features: ["ipadic", "ko-dic", "cc-cedict"]
runs-on: ${{ matrix.platform.runner }}
steps:
- name: Run checkout
uses: actions/checkout@v4

- name: Install toolchain
uses: dtolnay/rust-toolchain@v1
with:
toolchain: ${{ matrix.toolchain }}
components: rustfmt, clippy

- name: Run check
run: cargo check --features "${{ matrix.features }}"

test:
strategy:
matrix:
platform:
- runner: ubuntu-latest
target: x86_64-unknown-linux-gnu
- runner: macOS-latest
target: x86_64-apple-darwin
- runner: macOS-latest
target: aarch64-apple-darwin
- runner: windows-latest
target: x86_64-pc-windows-msvc
toolchain: [stable]
features: ["ipadic", "ko-dic", "cc-cedict"]
runs-on: ${{ matrix.platform.runner }}
steps:
- name: Run checkout
uses: actions/checkout@v4

- name: Install toolchain
uses: dtolnay/rust-toolchain@v1
with:
toolchain: ${{ matrix.toolchain }}
target: ${{ matrix.platform.target }}
components: rustfmt, clippy

- name: Run test
run: cargo test --target "${{ matrix.platform.target }}" --features "${{ matrix.features }}"

0 comments on commit e8782ad

Please sign in to comment.