Hehe #367
This file contains hidden or 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: fcore build | |
| on: | |
| push: | |
| branches: ["main"] | |
| pull_request: | |
| branches: ["main"] | |
| env: | |
| CARGO_TERM_COLOR: always | |
| jobs: | |
| tests: | |
| runs-on: ubuntu-22.04 | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Install Rust | |
| uses: dtolnay/rust-toolchain@nightly | |
| - name: Install dependencies | |
| run: sudo apt-get update && sudo apt-get install -y protobuf-compiler | |
| - name: Test Lib | |
| run: cargo test --lib | |
| build-node: | |
| needs: [tests] | |
| runs-on: ubuntu-22.04 | |
| strategy: | |
| matrix: | |
| target: [x86_64-unknown-linux-gnu, aarch64-unknown-linux-gnu] | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Install Rust | |
| uses: dtolnay/rust-toolchain@nightly | |
| with: | |
| targets: ${{ matrix.target }} | |
| - uses: Swatinem/rust-cache@v2 | |
| with: | |
| key: ${{ matrix.target }} | |
| - name: Install Build Tools | |
| run: | | |
| sudo apt-get update && sudo apt-get install -y protobuf-compiler | |
| pip3 install ziglang | |
| cargo install cargo-zigbuild | |
| - name: Build Node | |
| run: cargo zigbuild --release --bin node --target ${{ matrix.target }} --features xray,wireguard | |
| - name: Upload Artifact | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: fcore-node-${{ matrix.target }} | |
| path: target/${{ matrix.target }}/release/node | |
| build-api: | |
| needs: [tests] | |
| runs-on: ubuntu-22.04 | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Install Rust | |
| uses: dtolnay/rust-toolchain@nightly | |
| - name: Build API | |
| run: cargo build --release --bin api --no-default-features | |
| - name: Upload Artifact | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: fcore-api | |
| path: target/release/api | |
| build-auth: | |
| needs: [tests] | |
| runs-on: ubuntu-22.04 | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Install Rust | |
| uses: dtolnay/rust-toolchain@nightly | |
| - name: Build Auth | |
| run: cargo build --release --bin auth --no-default-features --features email | |
| - name: Upload Artifact | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: fcore-auth | |
| path: target/release/auth | |
| collect-binaries: | |
| runs-on: ubuntu-latest | |
| needs: [build-node, build-api, build-auth] | |
| steps: | |
| - name: Download all artifacts | |
| uses: actions/download-artifact@v4 | |
| with: | |
| path: collected | |
| pattern: fcore-* | |
| merge-multiple: false | |
| - name: Upload combined bundle | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: fcore-full-bundle | |
| path: collected/ |