Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix workflows #41

Merged
merged 2 commits into from
Dec 13, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
51 changes: 50 additions & 1 deletion .github/workflows/periodic.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,56 @@ on:
- cron: 0 0 * * SUN

jobs:
fmt:
name: Format
strategy:
matrix:
platform:
- runner: ubuntu-latest
target: x86_64
toolchain: [stable]
features: [cjk]
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
needs: [fmt]
strategy:
matrix:
platform:
- runner: ubuntu-latest
target: x86_64
toolchain: [stable]
features: [cjk]
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:
name: Test
needs: [check]
strategy:
matrix:
platform:
Expand All @@ -18,7 +67,7 @@ jobs:
target: aarch64-apple-darwin
- runner: windows-latest
target: x86_64-pc-windows-msvc
toolchain: [stable, beta, nightly]
toolchain: [stable]
features: [cjk]
runs-on: ${{ matrix.platform.runner }}
steps:
Expand Down
3 changes: 3 additions & 0 deletions .github/workflows/regression.yml
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@ jobs:

check:
name: Check
needs: [fmt]
strategy:
matrix:
platform:
Expand All @@ -56,6 +57,8 @@ jobs:
run: cargo check --features "${{ matrix.features }}"

test:
name: Test
needs: [check]
strategy:
matrix:
platform:
Expand Down
146 changes: 90 additions & 56 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,87 @@ permissions:
contents: read

jobs:
fmt:
name: Format
strategy:
matrix:
platform:
- runner: ubuntu-latest
target: x86_64
toolchain: [stable]
features: [cjk]
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
needs: [fmt]
strategy:
matrix:
platform:
- runner: ubuntu-latest
target: x86_64
toolchain: [stable]
features: [cjk]
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:
name: Test
needs: [check]
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: [cjk]
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 }}"

linux:
name: Linux
needs: [test]
runs-on: ${{ matrix.platform.runner }}
strategy:
matrix:
Expand All @@ -25,14 +105,6 @@ jobs:
target: x86_64
- runner: ubuntu-22.04
target: x86
# - runner: ubuntu-22.04
# target: aarch64
# - runner: ubuntu-22.04
# target: armv7
# - runner: ubuntu-22.04
# target: s390x
# - runner: ubuntu-22.04
# target: ppc64le
steps:
- name: Run checkout
uses: actions/checkout@v4
Expand All @@ -49,7 +121,6 @@ jobs:
args: --release --out dist --find-interpreter --features=cjk
sccache: 'true'
manylinux: auto
# before-script-linux: "apt-get update && apt-get install libssl-dev pkg-config -y"
before-script-linux: "yum install openssl-devel devtoolset-10-libatomic-devel perl-IPC-Cmd -y"

- name: Upload wheels
Expand All @@ -59,22 +130,16 @@ jobs:
path: dist

linux2:
name: Linux2
needs: [test]
runs-on: ${{ matrix.platform.runner }}
strategy:
matrix:
platform:
# - runner: ubuntu-22.04
# target: x86_64
# - runner: ubuntu-22.04
# target: x86
- runner: ubuntu-22.04
target: aarch64
- runner: ubuntu-22.04
target: armv7
# - runner: ubuntu-22.04
# target: s390x
# - runner: ubuntu-22.04
# target: ppc64le
steps:
- name: Run checkout
uses: actions/checkout@v4
Expand All @@ -100,6 +165,8 @@ jobs:
path: dist

musllinux:
name: MuslLinux
needs: [test]
runs-on: ${{ matrix.platform.runner }}
strategy:
matrix:
Expand Down Expand Up @@ -136,44 +203,9 @@ jobs:
name: wheels-musllinux-${{ matrix.platform.target }}
path: dist

# musllinux2:
# runs-on: ${{ matrix.platform.runner }}
# strategy:
# matrix:
# platform:
# # - runner: ubuntu-22.04
# # target: x86_64
# # - runner: ubuntu-22.04
# # target: x86
# - runner: ubuntu-22.04
# target: aarch64
# - runner: ubuntu-22.04
# target: armv7
# steps:
# - name: Run checkout
# uses: actions/checkout@v4

# - name: Setup Python
# uses: actions/setup-python@v5
# with:
# python-version: 3.x

# - name: Build wheels
# uses: PyO3/maturin-action@v1
# with:
# target: ${{ matrix.platform.target }}
# args: --release --out dist --find-interpreter --features=cjk
# sccache: 'true'
# manylinux: musllinux_1_2
# before-script-linux: "apt-get update && apt-get install libssl-dev pkg-config -y"

# - name: Upload wheels
# uses: actions/upload-artifact@v4
# with:
# name: wheels-musllinux-${{ matrix.platform.target }}
# path: dist

windows:
name: Windows
needs: [test]
runs-on: ${{ matrix.platform.runner }}
strategy:
matrix:
Expand Down Expand Up @@ -206,6 +238,8 @@ jobs:
path: dist

macos:
name: MacOS
needs: [test]
runs-on: ${{ matrix.platform.runner }}
strategy:
matrix:
Expand Down Expand Up @@ -256,9 +290,9 @@ jobs:

release:
name: Release
needs: [linux, linux2, musllinux, windows, macos, sdist]
runs-on: ubuntu-latest
if: ${{ startsWith(github.ref, 'refs/tags/') || github.event_name == 'workflow_dispatch' }}
needs: [linux, musllinux, windows, macos, sdist]
permissions:
# Use to sign the release artifacts
id-token: write
Expand Down Expand Up @@ -299,11 +333,11 @@ jobs:

publish-crates:
name: Publish crate
needs: [release]
strategy:
matrix:
os: [ubuntu-latest]
toolchain: [stable]
needs: [release]
runs-on: ${{ matrix.os }}
steps:
- name: Checkout
Expand Down
Loading