1010
1111jobs :
1212 build :
13- name : Build ${{ matrix.target }}
14- runs-on : ${{ matrix.os }}
15- strategy :
16- fail-fast : false
17- matrix :
18- include :
19- - os : macos-14
20- target : aarch64-apple-darwin
21- artifact : scenesplit-macos-arm64
22- - os : ubuntu-22.04
23- target : x86_64-unknown-linux-gnu
24- artifact : scenesplit-linux-x64
13+ name : Build Linux
14+ runs-on : ubuntu-22.04
2515
2616 steps :
2717 - uses : actions/checkout@v4
2818
2919 - name : Install Rust
3020 uses : dtolnay/rust-toolchain@stable
31- with :
32- targets : ${{ matrix.target }}
33-
34- - name : Install dependencies (macOS)
35- if : runner.os == 'macOS'
36- run : |
37- brew install opencv onnxruntime pkg-config llvm
38- echo "LIBCLANG_PATH=$(brew --prefix llvm)/lib" >> $GITHUB_ENV
3921
40- - name : Install dependencies (Linux)
41- if : runner.os == 'Linux'
22+ - name : Install dependencies
4223 run : |
4324 sudo apt-get update
44- sudo apt-get install -y \
45- libopencv-dev \
46- clang \
47- libclang-dev \
48- pkg-config
49-
50- # Download and install ONNX Runtime
25+ sudo apt-get install -y libopencv-dev clang libclang-dev pkg-config
5126 ONNX_VERSION="1.16.3"
5227 curl -L "https://github.com/microsoft/onnxruntime/releases/download/v${ONNX_VERSION}/onnxruntime-linux-x64-${ONNX_VERSION}.tgz" | tar xz
5328 sudo mv onnxruntime-linux-x64-${ONNX_VERSION} /opt/onnxruntime
5429 echo "ORT_LIB_LOCATION=/opt/onnxruntime/lib" >> $GITHUB_ENV
55- echo "LD_LIBRARY_PATH=/opt/onnxruntime/lib:$LD_LIBRARY_PATH" >> $GITHUB_ENV
5630
5731 - name : Build
58- run : cargo build --release --target ${{ matrix.target }}
59-
60- - name : Package (macOS)
61- if : runner.os == 'macOS'
62- run : |
63- mkdir -p dist
64- cp target/${{ matrix.target }}/release/scenesplit dist/
65- cd dist
66- tar czf ../${{ matrix.artifact }}.tar.gz scenesplit
32+ run : cargo build --release
6733
68- - name : Package (Linux)
69- if : runner.os == 'Linux'
34+ - name : Package
7035 run : |
7136 mkdir -p dist
72- cp target/${{ matrix.target }}/ release/scenesplit dist/
37+ cp target/release/scenesplit dist/
7338 cd dist
74- tar czf ../${{ matrix.artifact }} .tar.gz scenesplit
39+ tar czf ../scenesplit-linux-x64 .tar.gz scenesplit
7540
7641 - name : Upload artifact
7742 uses : actions/upload-artifact@v4
7843 with :
79- name : ${{ matrix.artifact }}
80- path : ${{ matrix.artifact }} .tar.gz
44+ name : scenesplit-linux-x64
45+ path : scenesplit-linux-x64 .tar.gz
8146
8247 release :
8348 name : Create Release
10671
10772 publish :
10873 name : Publish to crates.io
109- needs : release
74+ needs : build
11075 runs-on : ubuntu-latest
111- # Only publish stable releases (not alpha/beta/rc)
11276 if : ${{ !contains(github.ref, 'alpha') && !contains(github.ref, 'beta') && !contains(github.ref, 'rc') }}
11377
11478 steps :
@@ -117,16 +81,7 @@ jobs:
11781 - name : Install Rust
11882 uses : dtolnay/rust-toolchain@stable
11983
120- - name : Install dependencies
121- run : |
122- sudo apt-get update
123- sudo apt-get install -y libopencv-dev clang libclang-dev pkg-config
124- ONNX_VERSION="1.16.3"
125- curl -L "https://github.com/microsoft/onnxruntime/releases/download/v${ONNX_VERSION}/onnxruntime-linux-x64-${ONNX_VERSION}.tgz" | tar xz
126- sudo mv onnxruntime-linux-x64-${ONNX_VERSION} /opt/onnxruntime
127- echo "ORT_LIB_LOCATION=/opt/onnxruntime/lib" >> $GITHUB_ENV
128-
12984 - name : Publish to crates.io
130- run : cargo publish --allow-dirty
85+ run : cargo publish --no-verify -- allow-dirty
13186 env :
13287 CARGO_REGISTRY_TOKEN : ${{ secrets.CARGO_REGISTRY_TOKEN }}
0 commit comments