|
| 1 | +name: build and package release native mode binaries |
| 2 | + |
| 3 | +on: |
| 4 | + push: |
| 5 | + branches: [ "main", "feat-node-manager-native-processes" ] |
| 6 | + pull_request: |
| 7 | + branches: [ "main" ] |
| 8 | + |
| 9 | +jobs: |
| 10 | + build: |
| 11 | + if: "startsWith(github.event.head_commit.message, 'chore: release native mode binaries')" |
| 12 | + name: build |
| 13 | + runs-on: ${{ matrix.os }} |
| 14 | + strategy: |
| 15 | + matrix: |
| 16 | + include: |
| 17 | + - os: windows-latest |
| 18 | + target: x86_64-pc-windows-msvc |
| 19 | + - os: macos-latest |
| 20 | + target: x86_64-apple-darwin |
| 21 | + - os: macos-latest |
| 22 | + target: aarch64-apple-darwin |
| 23 | + - os: ubuntu-latest |
| 24 | + target: x86_64-unknown-linux-musl |
| 25 | + - os: ubuntu-latest |
| 26 | + target: arm-unknown-linux-musleabi |
| 27 | + - os: ubuntu-latest |
| 28 | + target: armv7-unknown-linux-musleabihf |
| 29 | + - os: ubuntu-latest |
| 30 | + target: aarch64-unknown-linux-musl |
| 31 | + steps: |
| 32 | + - name: Checkout code |
| 33 | + uses: actions/checkout@v4 |
| 34 | + |
| 35 | + - name: Set up Node.js |
| 36 | + uses: actions/setup-node@v3 |
| 37 | + with: |
| 38 | + node-version: '23.6.1' |
| 39 | + |
| 40 | + - name: Install node dependencies |
| 41 | + run: npm install |
| 42 | + |
| 43 | + - name: Install stable Rust |
| 44 | + uses: dtolnay/rust-toolchain@stable |
| 45 | + |
| 46 | + - name: Install build tools |
| 47 | + uses: cargo-bins/cargo-binstall@main |
| 48 | + |
| 49 | + - name: Install cargo build tools |
| 50 | + shell: bash |
| 51 | + run: cargo binstall --no-confirm cargo-leptos |
| 52 | + |
| 53 | + - name: Install Rust target components |
| 54 | + shell: bash |
| 55 | + run: rustup target add wasm32-unknown-unknown |
| 56 | + |
| 57 | + - name: Build |
| 58 | + shell: bash |
| 59 | + run: cargo leptos build --release --features native -vv |
| 60 | + |
| 61 | + - name: Upload artifacts |
| 62 | + uses: actions/upload-artifact@main |
| 63 | + with: |
| 64 | + name: formicaio-${{ matrix.target }} |
| 65 | + path: | |
| 66 | + target/release/formicaio |
| 67 | + target/release/formicaio.exe* |
0 commit comments