build #12
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: | | |
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 | |
build-aarch64-linux: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Add AArch64 target for Linux | |
run: rustup target add aarch64-unknown-linux-gnu | |
- name: Install AArch64 Linux toolchain | |
run: sudo apt-get update && sudo apt-get install -y gcc-aarch64-linux-gnu | |
- name: Build project for AArch64 Linux | |
run: CC=aarch64-linux-gnu-gcc cargo build --release --target aarch64-unknown-linux-gnu | |
- name: Copy model folder for AArch64 Linux | |
run: | | |
cp -r ./model ./target/aarch64-unknown-linux-gnu/release/ | |
- name: Archive artifacts for AArch64 Linux | |
uses: actions/upload-artifact@v2 | |
with: | |
name: aarch64-unknown-linux-gnu | |
path: | | |
./target/aarch64-unknown-linux-gnu/release/ddddocr | |
./target/aarch64-unknown-linux-gnu/release/model | |
build-aarch64-linux-inline: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Add AArch64 target for Linux | |
run: rustup target add aarch64-unknown-linux-gnu | |
- name: Install AArch64 Linux toolchain | |
run: sudo apt-get update && sudo apt-get install -y gcc-aarch64-linux-gnu | |
- name: Build project for AArch64 Linux | |
run: CC=aarch64-linux-gnu-gcc cargo build --release --target aarch64-unknown-linux-gnu --features "inline-model" | |
- name: Archive artifacts for AArch64 Linux with inline-model | |
uses: actions/upload-artifact@v2 | |
with: | |
name: aarch64-unknown-linux-gnu-inline | |
path: ./target/aarch64-unknown-linux-gnu/release/ddddocr | |
build-aarch64-macos: | |
runs-on: macos-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Build project for AArch64 macOS | |
run: cargo build --release --target aarch64-apple-darwin | |
- name: Copy model folder for AArch64 macOS | |
run: | | |
cp -r ./model ./target/aarch64-apple-darwin/release/ | |
- name: Archive artifacts for AArch64 macOS | |
uses: actions/upload-artifact@v2 | |
with: | |
name: aarch64-apple-darwin | |
path: | | |
./target/aarch64-apple-darwin/release/ddddocr | |
./target/aarch64-apple-darwin/release/model | |
build-aarch64-macos-inline: | |
runs-on: macos-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Build project for AArch64 macOS with inline-model feature | |
run: cargo build --release --target aarch64-apple-darwin --features "inline-model" | |
- name: Archive artifacts for AArch64 macOS with inline-model | |
uses: actions/upload-artifact@v2 | |
with: | |
name: aarch64-apple-darwin-inline | |
path: ./target/aarch64-apple-darwin/release/ddddocr |