Use WebKit's own install-dependencies script for Linux CI #5
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: Build validate-dnr-rules | |
| on: | |
| push: | |
| branches: [ghostery/*] | |
| paths: | |
| - 'ghostery/validate-dnr-rules/**' | |
| - 'Source/WebCore/contentextensions/**' | |
| - 'Source/WTF/**' | |
| - 'CMakeLists.txt' | |
| - '.github/workflows/validate-dnr-rules.yml' | |
| workflow_dispatch: | |
| jobs: | |
| build: | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| include: | |
| - os: ubuntu-24.04 | |
| name: linux-x64 | |
| runs-on: ${{ matrix.os }} | |
| steps: | |
| - uses: actions/checkout@v4 | |
| with: | |
| fetch-depth: 1 | |
| - name: Install WebKit GTK build dependencies | |
| run: yes | Tools/gtk/install-dependencies | |
| - name: Configure | |
| run: | | |
| cmake -B build -G Ninja \ | |
| -DCMAKE_BUILD_TYPE=Release \ | |
| -DPORT=GTK \ | |
| -DENABLE_TOOLS=OFF \ | |
| -DENABLE_API_TESTS=OFF \ | |
| . | |
| - name: Build validate-dnr-rules | |
| run: cmake --build build --target validate-dnr-rules | |
| - name: Test | |
| run: | | |
| cat > /tmp/test-rules.json << 'RULES' | |
| [ | |
| {"id":1,"priority":1,"action":{"type":"block"},"condition":{"regexFilter":"ad[0-9]{2}\\.js"}}, | |
| {"id":2,"priority":1,"action":{"type":"block"},"condition":{"regexFilter":"(?:ads|tracking)\\.com"}}, | |
| {"id":3,"priority":1,"action":{"type":"block"},"condition":{"regexFilter":"tracker\\d+\\.js"}}, | |
| {"id":4,"priority":1,"action":{"type":"block"},"condition":{"regexFilter":"pixel\\b"}} | |
| ] | |
| RULES | |
| ./build/validate-dnr-rules /tmp/test-rules.json | |
| - name: Binary info | |
| run: | | |
| file build/validate-dnr-rules | |
| du -h build/validate-dnr-rules | |
| ldd build/validate-dnr-rules || true | |
| - name: Upload artifact | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: validate-dnr-rules-${{ matrix.name }} | |
| path: build/validate-dnr-rules |