lidi-clients: option to chroot lidi-receive-file (requires CAP_SYS_CH… #20
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: Release | |
| on: | |
| push: | |
| branches: [ master, dev ] | |
| pull_request: | |
| branches: [ master ] | |
| workflow_dispatch: | |
| env: | |
| CARGO_TERM_COLOR: always | |
| SUFFIX: ${{ github.ref_type == 'tag' && github.ref_name || github.sha }} | |
| jobs: | |
| build-linux: | |
| name: Build for Linux | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v6 | |
| - name: Install system dependencies | |
| run: | | |
| sudo apt update | |
| sudo apt install just | |
| - name: Update rust | |
| run: rustup update | |
| - name: Build release | |
| run: | | |
| just release | |
| just grant_chroot_receive_file | |
| - name: Gather artifacts | |
| run: | | |
| mkdir -p artifacts/release/ | |
| cp target/release/lidi-{receive,send} artifacts/release/ | |
| cp target/release/lidi-{flood,oneshot}-{receive,send} artifacts/release/ | |
| cp target/release/lidi-{receive,send}-{file,udp} artifacts/release/ | |
| cp target/release/lidi-send-dir artifacts/release/ | |
| cp target/release/lidi-network-simulator artifacts/release/ | |
| cp target/release/liblidi_bindings.so artifacts/release/ | |
| - name: Upload release artifacts | |
| uses: actions/upload-artifact@v7 | |
| with: | |
| name: linux | |
| path: artifacts | |
| retention-days: 0 | |
| package: | |
| name: Package artifacts | |
| runs-on: ubuntu-latest | |
| needs: [ build-linux ] | |
| steps: | |
| - uses: actions/checkout@v6 | |
| - uses: actions/download-artifact@v8 | |
| with: | |
| merge-multiple: true | |
| path: artifacts | |
| - name: Gathering artifacts | |
| run: | | |
| mkdir -p release/lidi-${{ env.SUFFIX }} | |
| mv artifacts/release/* release/lidi-${{ env.SUFFIX }}/ | |
| cp -r LICENSE README.md release/lidi-${{ env.SUFFIX }}/ | |
| - name: Upload release artifacts | |
| uses: actions/upload-artifact@v7 | |
| with: | |
| name: lidi-${{ env.SUFFIX }} | |
| path: release | |