Merge pull request #32 from Quad9DNS/feature/cidr-rule #83
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: CI | |
| on: | |
| push: | |
| branches: | |
| - main | |
| pull_request: | |
| permissions: | |
| contents: write | |
| deployments: write | |
| jobs: | |
| lint: | |
| name: Lint | |
| runs-on: ubuntu-latest | |
| strategy: | |
| matrix: | |
| target: [x86_64-unknown-linux-gnu, x86_64-unknown-linux-musl] | |
| steps: | |
| - name: Checkout repo | |
| uses: actions/checkout@v4 | |
| - name: Setup rust toolchain | |
| uses: actions-rust-lang/setup-rust-toolchain@v1 | |
| with: | |
| target: ${{ matrix.target }} | |
| - name: Setup cargo deny | |
| run: cargo install cargo-deny | |
| - name: Run checks | |
| run: make check-all | |
| - name: Run tests | |
| run: make test | |
| build: | |
| name: Try building the binary and docs | |
| runs-on: ubuntu-latest | |
| strategy: | |
| matrix: | |
| target: [x86_64-unknown-linux-gnu, x86_64-unknown-linux-musl] | |
| steps: | |
| - name: Checkout repo | |
| uses: actions/checkout@v4 | |
| - name: Setup rust toolchain | |
| uses: actions-rust-lang/setup-rust-toolchain@v1 | |
| with: | |
| target: ${{ matrix.target }} | |
| - name: Install librdkafka | |
| if: ${{ matrix.needs-librdkafka }} | |
| run: sudo apt-get update -y && sudo apt-get -y install librdkafka-dev | |
| - name: Install musl-tools | |
| if: ${{ matrix.needs-musl }} | |
| run: | | |
| sudo apt-get update -y && sudo apt-get -y install musl-tools g++ | |
| # HACK to resolve musl build - will probably cause an issue in the future | |
| sudo ln -s /bin/g++ /bin/musl-g++ | |
| - name: Install scdoc | |
| run: sudo apt-get update -y && sudo apt-get -y install scdoc | |
| - name: Build docs | |
| run: make doc | |
| - name: Build basic binary | |
| run: make basic | |
| - name: Build full binary | |
| run: make all | |
| bench: | |
| name: Run all benchmarks | |
| runs-on: ubuntu-latest | |
| strategy: | |
| matrix: | |
| target: [x86_64-unknown-linux-gnu, x86_64-unknown-linux-musl] | |
| steps: | |
| - name: Checkout repo | |
| uses: actions/checkout@v4 | |
| - name: Setup rust toolchain | |
| uses: actions-rust-lang/setup-rust-toolchain@v1 | |
| with: | |
| target: ${{ matrix.target }} | |
| - name: Run benchmarks | |
| run: cargo bench -- --output-format bencher | tee benchmark.txt | |
| - name: Store benchmark result | |
| uses: benchmark-action/github-action-benchmark@v1 | |
| with: | |
| tool: 'cargo' | |
| output-file-path: benchmark.txt | |
| github-token: ${{ secrets.GITHUB_TOKEN }} | |
| auto-push: ${{ github.event_name != 'pull_request' }} | |
| comment-on-alert: true | |
| fail-on-alert: true | |
| summary-always: true |