From 31dccfff7192feb181a4e45c5ce574dc7873d43c Mon Sep 17 00:00:00 2001 From: Jun Luo <4catcode@gmail.com> Date: Tue, 2 Jan 2024 19:50:06 +0800 Subject: [PATCH] wip --- .github/workflows/ci.yml | 35 +++++++++++++++++++++++++++++------ 1 file changed, 29 insertions(+), 6 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 951f999..707eba4 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -4,6 +4,7 @@ on: push: branches: - main + - master tags: - '*' pull_request: @@ -13,17 +14,38 @@ permissions: contents: read jobs: - linux: + test: + name: Test runs-on: ubuntu-latest strategy: matrix: - target: [x86_64, x86, aarch64, armv7, s390x, ppc64le] python-version: ['3.7', '3.8', '3.9', '3.10', '3.11', '3.12'] steps: - uses: actions/checkout@v3 - uses: actions/setup-python@v4 with: python-version: ${{ matrix.python-version }} + - uses: actions-rust-lang/setup-rust-toolchain@v1 + - name: Install maturin + run: pip install maturin + - name: Build wheels + run: maturin build --release + - name: Install fastcrc + run: pip install target/wheels/fastcrc*.whl + - name: Test + run: python tests/test_fastcrc.py + + linux: + runs-on: ubuntu-latest + needs: test + strategy: + matrix: + target: [x86_64, x86, aarch64, armv7, s390x, ppc64le] + steps: + - uses: actions/checkout@v3 + - uses: actions/setup-python@v4 + with: + python-version: '3.12' - name: Build wheels uses: PyO3/maturin-action@v1 with: @@ -39,15 +61,15 @@ jobs: windows: runs-on: windows-latest + needs: test strategy: matrix: target: [x64, x86] - python-version: ['3.7', '3.8', '3.9', '3.10', '3.11', '3.12'] steps: - uses: actions/checkout@v3 - uses: actions/setup-python@v4 with: - python-version: ${{ matrix.python-version }} + python-version: '3.12' architecture: ${{ matrix.target }} - name: Build wheels uses: PyO3/maturin-action@v1 @@ -63,15 +85,15 @@ jobs: macos: runs-on: macos-latest + needs: test strategy: matrix: target: [x86_64, aarch64] - python-version: ['3.7', '3.8', '3.9', '3.10', '3.11', '3.12'] steps: - uses: actions/checkout@v3 - uses: actions/setup-python@v4 with: - python-version: ${{ matrix.python-version }} + python-version: '3.12' - name: Build wheels uses: PyO3/maturin-action@v1 with: @@ -86,6 +108,7 @@ jobs: sdist: runs-on: ubuntu-latest + needs: test steps: - uses: actions/checkout@v3 - name: Build sdist