Skip to content

fix runtime_build not dfa #99

fix runtime_build not dfa

fix runtime_build not dfa #99

Workflow file for this run

name: release
on:
push:
paths:
- 'matcher_py/src/**'
- 'matcher_rs/src/**'
- 'matcher_c/src/**'
- '.github/workflows/release.yml'
pull_request:
paths:
- 'matcher_py/src/**'
- 'matcher_rs/src/**'
- 'matcher_c/src/**'
- '.github/workflows/release.yml'
permissions:
contents: write
jobs:
build:
runs-on: ${{ matrix.platform.runner }}
strategy:
fail-fast: false
matrix:
platform:
- runner: ubuntu-latest
target: x86_64-unknown-linux-gnu
suffix: so
# - runner: ubuntu-latest
# target: aarch64-unknown-linux-gnu
# suffix: so
- runner: macos-12
target: x86_64-apple-darwin
suffix: dylib
- runner: macos-14
target: aarch64-apple-darwin
suffix: dylib
- runner: windows-latest
target: x86_64-pc-windows-gnu
suffix: dll
- runner: windows-latest
target: x86_64-pc-windows-msvc
suffix: dll
steps:
- uses: actions/checkout@v4
- name: Install Rust
uses: dtolnay/rust-toolchain@master
with:
toolchain: nightly
targets: ${{ matrix.platform.target }}
- name: Install dependencies
if: matrix.platform.runner == 'ubuntu-latest' && matrix.platform.target == 'aarch64-unknown-linux-gnu'
run: sudo apt-get install gcc-aarch64-linux-gnu
- name: Build
run: cargo build --release --target ${{ matrix.platform.target }}
- name: List files
run: ls ./target/${{ matrix.platform.target }}/release/
- name: Rename
shell: bash
run: |
mkdir libmatcher
mv ./target/${{ matrix.platform.target }}/release/*matcher_c.${{ matrix.platform.suffix }} libmatcher/${{ matrix.platform.target }}-libmatcher_c.${{ matrix.platform.suffix }}
mv ./target/${{ matrix.platform.target }}/release/*matcher_py.${{ matrix.platform.suffix }} libmatcher/${{ matrix.platform.target }}-libmatcher_py.${{ matrix.platform.suffix }}
- name: Upload release
uses: actions/upload-artifact@v4
with:
name: libmatcher-${{ matrix.platform.target }}
path: libmatcher
release:
name: Release
runs-on: ubuntu-latest
if: startsWith(github.ref, 'refs/tags/')
needs: [build]
steps:
- name: Download artifact
uses: actions/download-artifact@v4
with:
pattern: libmatcher-*
merge-multiple: true
path: artifact
- name: Make release
uses: softprops/action-gh-release@v2
with:
draft: true
prerelease: false
generate_release_notes: true
files: artifact/*