|
31 | 31 | targets: ${{ matrix.target }} |
32 | 32 |
|
33 | 33 | - name: Build release binary |
34 | | - run: cargo build --release --locked --target ${{ matrix.target }} |
| 34 | + run: | |
| 35 | + CC=clang CXX=clang++ \ |
| 36 | + SDKROOT=$(xcrun --show-sdk-path) \ |
| 37 | + MACOSX_DEPLOYMENT_TARGET=13.0 \ |
| 38 | + cargo build --release --locked --target ${{ matrix.target }} |
35 | 39 |
|
36 | 40 | - name: Create app bundle |
37 | 41 | run: | |
|
55 | 59 | uses: softprops/action-gh-release@v2 |
56 | 60 | with: |
57 | 61 | files: dist/release/${{ matrix.asset_name }} |
| 62 | + |
| 63 | + build-linux: |
| 64 | + name: Build Linux |
| 65 | + runs-on: ubuntu-latest |
| 66 | + steps: |
| 67 | + - name: Checkout |
| 68 | + uses: actions/checkout@v4 |
| 69 | + |
| 70 | + - name: Install dependencies |
| 71 | + run: | |
| 72 | + sudo apt-get update |
| 73 | + sudo apt-get install -y build-essential cmake libasound2-dev libpulse-dev |
| 74 | +
|
| 75 | + - name: Install Rust toolchain |
| 76 | + uses: dtolnay/rust-toolchain@stable |
| 77 | + |
| 78 | + - name: Build release binary |
| 79 | + run: cargo build --release --locked |
| 80 | + |
| 81 | + - name: Strip binary |
| 82 | + run: strip target/release/onevox |
| 83 | + |
| 84 | + - name: Create tarball |
| 85 | + run: | |
| 86 | + mkdir -p dist/release |
| 87 | + mkdir -p "dist/onevox-${{ github.ref_name }}-linux-x86_64" |
| 88 | + cp target/release/onevox "dist/onevox-${{ github.ref_name }}-linux-x86_64/" |
| 89 | + cp scripts/install_linux.sh "dist/onevox-${{ github.ref_name }}-linux-x86_64/" |
| 90 | + cp scripts/uninstall_linux.sh "dist/onevox-${{ github.ref_name }}-linux-x86_64/" |
| 91 | + cp README.md "dist/onevox-${{ github.ref_name }}-linux-x86_64/" |
| 92 | + cp config.example.toml "dist/onevox-${{ github.ref_name }}-linux-x86_64/" |
| 93 | + cd dist |
| 94 | + tar -czf "release/onevox-${{ github.ref_name }}-linux-x86_64.tar.gz" "onevox-${{ github.ref_name }}-linux-x86_64" |
| 95 | +
|
| 96 | + - name: Upload release asset |
| 97 | + uses: softprops/action-gh-release@v2 |
| 98 | + with: |
| 99 | + files: dist/release/*.tar.gz |
| 100 | + |
| 101 | + build-windows: |
| 102 | + name: Build Windows |
| 103 | + runs-on: windows-latest |
| 104 | + steps: |
| 105 | + - name: Checkout |
| 106 | + uses: actions/checkout@v4 |
| 107 | + |
| 108 | + - name: Install Rust toolchain |
| 109 | + uses: dtolnay/rust-toolchain@stable |
| 110 | + |
| 111 | + - name: Build release binary |
| 112 | + run: cargo build --release --locked |
| 113 | + |
| 114 | + - name: Create ZIP archive |
| 115 | + run: | |
| 116 | + mkdir -p dist/release |
| 117 | + mkdir -p "dist/onevox-${{ github.ref_name }}-windows-x64" |
| 118 | + copy target\release\onevox.exe "dist\onevox-${{ github.ref_name }}-windows-x64\" |
| 119 | + copy README.md "dist\onevox-${{ github.ref_name }}-windows-x64\" |
| 120 | + copy config.example.toml "dist\onevox-${{ github.ref_name }}-windows-x64\" |
| 121 | + cd dist |
| 122 | + Compress-Archive -Path "onevox-${{ github.ref_name }}-windows-x64" -DestinationPath "release/onevox-${{ github.ref_name }}-windows-x64.zip" |
| 123 | +
|
| 124 | + - name: Upload release asset |
| 125 | + uses: softprops/action-gh-release@v2 |
| 126 | + with: |
| 127 | + files: dist/release/*.zip |
0 commit comments