build #8
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: build | |
on: | |
workflow_dispatch: | |
jobs: | |
build-windows-x86: | |
runs-on: windows-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Build project for Windows x86 | |
run: cargo build --release --target i686-pc-windows-msvc | |
- name: Copy model folder for Windows x86 | |
run: | | |
mkdir ./target/i686-pc-windows-msvc/release/model | |
cp -r ./model ./target/i686-pc-windows-msvc/release/ | |
- name: Archive artifacts for Windows x86 | |
uses: actions/upload-artifact@v2 | |
with: | |
name: i686-pc-windows-msvc | |
path: | | |
./target/i686-pc-windows-msvc/release/ddddocr.exe | |
./target/i686-pc-windows-msvc/release/model | |
build-windows-x64: | |
runs-on: windows-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Build project for Windows x64 | |
run: cargo build --release | |
- name: Copy model folder for Windows x64 | |
run: | | |
mkdir ./target/release/model | |
cp -r ./model ./target/release/ | |
- name: Archive artifacts for Windows x64 | |
uses: actions/upload-artifact@v2 | |
with: | |
name: x86_64-pc-windows-msvc | |
path: | | |
./target/release/ddddocr.exe | |
./target/release/model | |
build-windows-x86-inline: | |
runs-on: windows-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Build project for Windows x86 with inline-model feature | |
run: cargo build --release --target i686-pc-windows-msvc --features "inline-model" | |
- name: Archive artifacts for Windows x86 with inline-model | |
uses: actions/upload-artifact@v2 | |
with: | |
name: i686-pc-windows-msvc-inline | |
path: ./target/i686-pc-windows-msvc/release/ddddocr.exe | |
build-windows-x64-inline: | |
runs-on: windows-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Build project for Windows x64 with inline-model feature | |
run: cargo build --release --features "inline-model" | |
- name: Archive artifacts for Windows x64 with inline-model | |
uses: actions/upload-artifact@v2 | |
with: | |
name: x86_64-pc-windows-msvc-inline | |
path: ./target/release/ddddocr.exe | |
build-linux: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Build project for Linux | |
run: cargo build --release | |
- name: Copy model folder for Linux | |
run: | | |
mkdir ./target/release/model | |
cp -r ./model ./target/release/ | |
- name: Archive artifacts for Linux | |
uses: actions/upload-artifact@v2 | |
with: | |
name: x86_64-unknown-linux-gnu | |
path: | | |
./target/release/ddddocr | |
./target/release/model | |
build-linux-inline: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Build project for Linux with inline-model feature | |
run: cargo build --release --features "inline-model" | |
- name: Archive artifacts for Linux with inline-model | |
uses: actions/upload-artifact@v2 | |
with: | |
name: x86_64-unknown-linux-gnu-inline | |
path: ./target/release/ddddocr | |
build-macos: | |
runs-on: macos-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Build project for macOS | |
run: cargo build --release | |
- name: Copy model folder for macOS | |
run: | | |
mkdir ./target/release/model | |
cp -r ./model ./target/release/ | |
- name: Archive artifacts for macOS | |
uses: actions/upload-artifact@v2 | |
with: | |
name: x86_64-apple-darwin | |
path: | | |
./target/release/ddddocr | |
./target/release/model | |
build-macos-inline: | |
runs-on: macos-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Build project for macOS with inline-model feature | |
run: cargo build --release --features "inline-model" | |
- name: Archive artifacts for macOS with inline-model | |
uses: actions/upload-artifact@v2 | |
with: | |
name: x86_64-apple-darwin-inline | |
path: ./target/release/ddddocr |