chore: update Cargo.lock #53
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, Test, Version and Publish | |
| concurrency: | |
| group: main | |
| cancel-in-progress: true | |
| on: | |
| push: | |
| branches: [main] | |
| env: | |
| CARGO_TERM_COLOR: always | |
| # GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
| jobs: | |
| # build-and-test: | |
| # uses: ./.github/workflows/rust-build-test.yml | |
| # with: | |
| # rust_version: '1.88' | |
| # run_clippy: false | |
| # run_tests: true | |
| # secrets: | |
| # SSH_PRIVATE_KEY_ONESEAL_REPO_CONSUME_ONESEAL_INTERNAL: ${{ secrets.SSH_PRIVATE_KEY_ONESEAL_REPO_CONSUME_ONESEAL_INTERNAL }} | |
| # build-release-linux-binaries: | |
| # services: | |
| # docker: | |
| # image: docker:dind | |
| # options: --privileged --shm-size=2g | |
| # volumes: | |
| # - /var/run/docker.sock:/var/run/docker.sock:ro | |
| # # needs: build-and-test | |
| # strategy: | |
| # matrix: | |
| # include: | |
| # - target: x86_64-unknown-linux-gnu | |
| # os: ubuntu-latest | |
| # - target: aarch64-unknown-linux-gnu | |
| # os: ubuntu-latest | |
| # - target: x86_64-unknown-linux-musl | |
| # os: ubuntu-latest | |
| # - target: aarch64-unknown-linux-musl | |
| # os: ubuntu-latest | |
| # runs-on: ${{ matrix.os}} | |
| # if: | |
| # github.event_name == 'push' && github.ref == | |
| # 'refs/heads/main' | |
| # steps: | |
| # - uses: actions/checkout@v4 | |
| # - name: Install Rust | |
| # uses: actions-rs/toolchain@v1 | |
| # with: | |
| # toolchain: '1.88' | |
| # override: true | |
| # target: ${{ matrix.target }} | |
| # # Linux-only setup (cross compilers) | |
| # # add before any `cargo build` that fetches git deps | |
| # - name: Start ssh-agent and add deploy key | |
| # uses: webfactory/ssh-agent@v0.5.4 | |
| # with: | |
| # ssh-private-key: | | |
| # ${{ secrets.SSH_PRIVATE_KEY_ONESEAL_REPO_CONSUME_ONESEAL_INTERNAL }} | |
| # - name: Add GitHub to known_hosts | |
| # run: | | |
| # if [ ! -d ~/.ssh ]; then mkdir -p ~/.ssh; else echo "dir exists"; fi | |
| # ssh-keyscan github.com >> ~/.ssh/known_hosts | |
| # - name: add net git fetch | |
| # run: | | |
| # mkdir -p .cargo | |
| # cat > .cargo/config.toml <<EOF | |
| # [net] | |
| # git-fetch-with-cli = true | |
| # EOF | |
| # cat .cargo/config.toml | |
| # # - name: ssh add key | |
| # # if: | |
| # # matrix.os == 'ubuntu-latest' || matrix.os == | |
| # # 'macos-latest' | |
| # # run: | | |
| # # mkdir -p ~/.ssh | |
| # # echo "${{ secrets.SSH_PRIVATE_KEY_ONESEAL_REPO_CONSUME_ONESEAL_INTERNAL }}" > ~/.ssh/oneseal_internal_id_rsa | |
| # # chmod 600 ~/.ssh/oneseal_internal_id_rsa | |
| # # ssh-keyscan github.com >> ~/.ssh/known_hosts | |
| # # ssh-add ~/.ssh/oneseal_internal_id_rsa | |
| # # chmod 644 ~/.ssh/known_hosts | |
| # - name: Install cross-compilers | |
| # if: runner.os == 'Linux' | |
| # run: | | |
| # # sudo apt-get update | |
| # cargo install cross | |
| # # case "${{ matrix.target }}" in | |
| # # aarch64-unknown-linux-gnu) | |
| # # sudo apt-get install -y gcc-aarch64-linux-gnu | |
| # # ;; | |
| # # aarch64-unknown-linux-musl) | |
| # # sudo apt-get install -y musl-tools gcc-aarch64-linux-gnu | |
| # # ;; | |
| # # x86_64-unknown-linux-musl) | |
| # # sudo apt-get install -y musl-tools | |
| # # ;; | |
| # # esac | |
| # - name: Build | |
| # run: | | |
| # cross build --release --target ${{ matrix.target }} | |
| # strip target/${{ matrix.target }}/release/oneseal || true | |
| # # - name: Check binary bloat | |
| # # run: | |
| # # cargo install cargo-bloat && cargo bloat --release | |
| # # --crates | |
| # # - name: Compress with UPX | |
| # # run: upx --best --lzma target/${{ matrix.target }}/release/oneseal | |
| # - name: Upload artifact | |
| # uses: actions/upload-artifact@v4 | |
| # with: | |
| # name: oneseal-${{ matrix.target }} | |
| # path: target/${{ matrix.target }}/release/oneseal | |
| build-release-macos-binaries: | |
| # needs: build-and-test | |
| strategy: | |
| matrix: | |
| include: | |
| - target: x86_64-apple-darwin | |
| - target: aarch64-apple-darwin | |
| runs-on: macos-latest | |
| if: | |
| github.event_name == 'push' && github.ref == | |
| 'refs/heads/main' | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Install Rust | |
| uses: actions-rs/toolchain@v1 | |
| with: | |
| toolchain: '1.88' | |
| override: true | |
| target: ${{ matrix.target }} | |
| # Linux-only setup (cross compilers) | |
| # add before any `cargo build` that fetches git deps | |
| - name: Start ssh-agent and add deploy key | |
| uses: webfactory/ssh-agent@v0.5.4 | |
| with: | |
| ssh-private-key: | | |
| ${{ secrets.SSH_PRIVATE_KEY_ONESEAL_REPO_CONSUME_ONESEAL_INTERNAL }} | |
| - name: Add GitHub to known_hosts | |
| run: | | |
| if [ ! -d ~/.ssh ]; then mkdir -p ~/.ssh; else echo "dir exists"; fi | |
| ssh-keyscan github.com >> ~/.ssh/known_hosts | |
| - name: add net git fetch | |
| run: | | |
| mkdir -p .cargo | |
| cat > .cargo/config.toml <<EOF | |
| [net] | |
| git-fetch-with-cli = true | |
| EOF | |
| cat .cargo/config.toml | |
| # - name: ssh add key | |
| # if: | |
| # matrix.os == 'ubuntu-latest' || matrix.os == | |
| # 'macos-latest' | |
| # run: | | |
| # mkdir -p ~/.ssh | |
| # echo "${{ secrets.SSH_PRIVATE_KEY_ONESEAL_REPO_CONSUME_ONESEAL_INTERNAL }}" > ~/.ssh/oneseal_internal_id_rsa | |
| # chmod 600 ~/.ssh/oneseal_internal_id_rsa | |
| # ssh-keyscan github.com >> ~/.ssh/known_hosts | |
| # ssh-add ~/.ssh/oneseal_internal_id_rsa | |
| # chmod 644 ~/.ssh/known_hosts | |
| - name: Build | |
| run: | | |
| cargo build --release --target ${{ matrix.target }} | |
| strip target/${{ matrix.target }}/release/oneseal || true | |
| # - name: Check binary bloat | |
| # run: | |
| # cargo install cargo-bloat && cargo bloat --release | |
| # --crates | |
| # - name: Compress with UPX | |
| # run: upx --best --lzma target/${{ matrix.target }}/release/oneseal | |
| - name: Upload artifact | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: ${{ matrix.target }} | |
| path: target/${{ matrix.target }}/release/oneseal | |
| publish: | |
| needs: | |
| # - build-release-linux-binaries | |
| - build-release-macos-binaries | |
| if: | |
| github.event_name == 'push' && github.ref == | |
| 'refs/heads/main' | |
| uses: ./.github/workflows/publish.yml | |
| with: | |
| rust_version: '1.88' | |
| secrets: | |
| RELEASE_TOKEN: ${{ secrets.PAT }} |