chore(deps): bump tokio from 1.51.0 to 1.52.2 #441
Workflow file for this run
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: Continuous Integration | |
| on: | |
| pull_request: | |
| push: | |
| branches: [master] | |
| env: | |
| # Because matklad said so https://matklad.github.io/2021/09/04/fast-rust-builds.html | |
| CARGO_INCREMENTAL: 0 | |
| jobs: | |
| ci: | |
| runs-on: ubuntu-latest | |
| if: "!contains(github.event.head_commit.message, 'ci skip')" | |
| steps: | |
| - name: Checkout sources | |
| uses: actions/checkout@v3 | |
| - name: Set up Rust cache | |
| uses: actions/cache@v3 | |
| with: | |
| path: | | |
| ~/.cargo/bin/ | |
| ~/.cargo/registry/index/ | |
| ~/.cargo/registry/cache/ | |
| ~/.cargo/git/db/ | |
| target/ | |
| key: dns-thingy-ci | |
| - uses: cachix/install-nix-action@v20 | |
| with: | |
| nix_path: nixpkgs=channel:nixos-unstable | |
| extra_nix_config: | | |
| access-tokens = github.com=${{ secrets.GITHUB_TOKEN }} | |
| - uses: cachix/cachix-action@v12 | |
| with: | |
| name: maximumstock | |
| authToken: "${{ secrets.CACHIX_AUTH_TOKEN }}" | |
| - name: Compile | |
| run: nix develop .#ci --command bash -c "cargo test --no-run --locked" | |
| - name: Test | |
| run: nix develop .#ci --command bash -c "cargo test -- --nocapture --quiet" | |
| - name: Format | |
| run: nix develop .#ci --command bash -c "cargo fmt --all -- --check" | |
| - name: Lint | |
| run: nix develop .#ci --command bash -c "cargo clippy -- -D warnings" | |
| - name: Build Release | |
| run: nix develop .#ci --command bash -c "cargo build --release" | |
| - name: Package Release Artifact | |
| run: | | |
| mkdir releases | |
| cp target/release/dns-block-tokio releases/dns-block-tokio | |
| strip releases/* | |
| - name: Upload Release Artifact | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: releases | |
| path: releases | |
| dependabot-auto-merge: | |
| runs-on: ubuntu-latest | |
| permissions: | |
| contents: write | |
| pull-requests: write | |
| needs: ci | |
| if: github.actor == 'dependabot[bot]' | |
| steps: | |
| - name: Dependabot metadata | |
| id: metadata | |
| uses: dependabot/fetch-metadata@v1 | |
| with: | |
| github-token: "${{ secrets.GITHUB_TOKEN }}" | |
| - name: Enable auto-merge for Dependabot PRs | |
| run: gh pr merge --auto --merge "$PR_URL" | |
| env: | |
| PR_URL: ${{github.event.pull_request.html_url}} | |
| GH_TOKEN: ${{secrets.GITHUB_TOKEN}} | |
| docker-build: | |
| needs: ci | |
| runs-on: ubuntu-latest | |
| if: "!contains(github.event.head_commit.message, 'docker skip') && github.ref_name == 'master'" | |
| steps: | |
| - uses: actions/checkout@v3 | |
| - name: Set up Docker Buildx | |
| uses: docker/setup-buildx-action@v1 | |
| - name: Login to DockerHub | |
| uses: docker/login-action@v1 | |
| with: | |
| username: ${{ secrets.DOCKERHUB_USERNAME }} | |
| password: ${{ secrets.DOCKERHUB_TOKEN }} | |
| - name: Build Docker Image | |
| id: docker_build_image | |
| uses: docker/build-push-action@v2 | |
| with: | |
| context: . | |
| file: ./Dockerfile | |
| push: true | |
| cache-from: type=gha | |
| cache-to: type=gha,mode=max | |
| tags: maximumstock2/dns-thingy:latest | |
| # benchmark: | |
| # needs: ci | |
| # runs-on: ubuntu-latest | |
| # if: "!contains(github.event.head_commit.message,'bench skip')" | |
| # steps: | |
| # - uses: actions/checkout@v3 | |
| # - uses: cachix/install-nix-action@v20 | |
| # with: | |
| # nix_path: nixpkgs=channel:nixos-unstable | |
| # extra_nix_config: | | |
| # access-tokens = github.com=${{ secrets.GITHUB_TOKEN }} | |
| # - uses: cachix/cachix-action@v12 | |
| # with: | |
| # name: maximumstock | |
| # authToken: "${{ secrets.CACHIX_AUTH_TOKEN }}" | |
| # - uses: actions/download-artifact@v4 | |
| # id: download | |
| # with: | |
| # name: releases | |
| # path: releases | |
| # - name: Run Benchmarks | |
| # run: | | |
| # chmod +x releases/dns-block* | |
| # nix-shell ci.nix --command "./benchmarks/run.sh" | |
| # - name: Upload Results | |
| # uses: actions/upload-artifact@v4 | |
| # with: | |
| # name: benchmark-results | |
| # path: benchmarks | |
| # benchmark-annotate-pr: | |
| # permissions: | |
| # actions: write | |
| # issues: write | |
| # pull-requests: write | |
| # needs: benchmark | |
| # runs-on: ubuntu-latest | |
| # if: github.ref_name != 'master' | |
| # env: | |
| # GH_TOKEN: ${{ github.token }} | |
| # BRANCH: ${{ github.head_ref }} | |
| # steps: | |
| # - uses: actions/checkout@v3 | |
| # - name: Annotate PR with benchmark artifact links | |
| # run: | | |
| # chmod +x scripts/annotate-pr-benchmark-link.sh | |
| # ./scripts/annotate-pr-benchmark-link.sh $GITHUB_HEAD_REF |