make jemalloc opt in #56
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: Build Argon server | |
| on: | |
| workflow_dispatch: | |
| push: | |
| jobs: | |
| build: | |
| name: ${{ matrix.name }} | |
| runs-on: ${{ matrix.os }} | |
| strategy: | |
| matrix: | |
| include: | |
| - name: Linux | |
| os: ubuntu-latest | |
| target: x86_64-unknown-linux-gnu | |
| bin-suffix: "-x64" | |
| - name: Linux ARM64 | |
| os: ubuntu-latest | |
| target: aarch64-unknown-linux-gnu | |
| bin-suffix: "-arm64" | |
| - name: Windows | |
| os: windows-latest | |
| target: x86_64-pc-windows-msvc | |
| bin-suffix: ".exe" | |
| steps: | |
| - name: Checkout repository | |
| uses: actions/checkout@v4 | |
| - name: Setup Rust | |
| uses: dtolnay/rust-toolchain@nightly | |
| with: | |
| toolchain: nightly | |
| target: ${{ matrix.target }} | |
| - name: Add Rust target | |
| if: matrix.target != 'aarch64-unknown-linux-gnu' | |
| run: rustup target add ${{ matrix.target }} | |
| shell: bash | |
| - name: Install cross | |
| if: matrix.target == 'aarch64-unknown-linux-gnu' | |
| run: | | |
| rustup target add x86_64-unknown-linux-gnu | |
| cargo install cross | |
| shell: bash | |
| - name: Build node (native) | |
| if: matrix.target != 'aarch64-unknown-linux-gnu' | |
| run: | | |
| cargo build --release --target ${{ matrix.target }} -p argon-node | |
| env: | |
| CARGO_NET_GIT_FETCH_WITH_CLI: true | |
| shell: bash | |
| - name: Build node (cross) | |
| if: matrix.target == 'aarch64-unknown-linux-gnu' | |
| run: | | |
| cross build --release --target ${{ matrix.target }} -p argon-node | |
| env: | |
| CARGO_NET_GIT_FETCH_WITH_CLI: true | |
| shell: bash | |
| - name: Build central (native) | |
| if: matrix.target != 'aarch64-unknown-linux-gnu' | |
| run: | | |
| cargo build --release --target ${{ matrix.target }} -p argon-server | |
| env: | |
| CARGO_NET_GIT_FETCH_WITH_CLI: true | |
| shell: bash | |
| - name: Build central (cross) | |
| if: matrix.target == 'aarch64-unknown-linux-gnu' | |
| run: | | |
| cross build --release --target ${{ matrix.target }} -p argon-server | |
| env: | |
| CARGO_NET_GIT_FETCH_WITH_CLI: true | |
| shell: bash | |
| - name: Create artifacts folder | |
| run: mkdir -p artifacts | |
| shell: bash | |
| - name: Copy artifacts (Windows) | |
| if: matrix.os == 'windows-latest' | |
| run: | | |
| cp target/${{ matrix.target }}/release/argon-node.exe artifacts/argon-node${{ matrix.bin-suffix }} || : | |
| cp target/${{ matrix.target }}/release/argon-server.exe artifacts/argon-central${{ matrix.bin-suffix }} || : | |
| shell: bash | |
| - name: Copy artifacts (Linux) | |
| if: matrix.os == 'ubuntu-latest' | |
| run: | | |
| cp target/${{ matrix.target }}/release/argon-node artifacts/argon-node${{ matrix.bin-suffix }} || : | |
| cp target/${{ matrix.target }}/release/argon-server artifacts/argon-central${{ matrix.bin-suffix }} || : | |
| shell: bash | |
| - name: Upload artifacts | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: ${{ matrix.target }}-build | |
| path: artifacts/* | |
| merge: | |
| name: Merge artifacts | |
| runs-on: ubuntu-latest | |
| needs: build | |
| steps: | |
| - name: Merge artifacts | |
| uses: actions/upload-artifact/merge@v4 | |
| with: | |
| name: argon-server-build | |
| delete-merged: true |