Skip to content

build

build #9

Workflow file for this run

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: |
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: |
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: |
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: |
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