bench: Fastify route validation, AOT vs runtime vs AJV #256
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: [master] | |
| pull_request: | |
| branches: [master] | |
| jobs: | |
| test: | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| os: [ubuntu-latest, macos-latest, windows-latest] | |
| node: [18, 20, 22] | |
| runs-on: ${{ matrix.os }} | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - uses: actions/setup-node@v4 | |
| with: | |
| node-version: ${{ matrix.node }} | |
| - name: Install RE2 (macOS) | |
| if: runner.os == 'macOS' | |
| run: brew install re2 abseil mimalloc | |
| - name: Install RE2 (Linux) | |
| if: runner.os == 'Linux' | |
| run: sudo apt-get update && sudo apt-get install -y libre2-dev libabsl-dev | |
| - name: Setup MSVC | |
| if: runner.os == 'Windows' | |
| uses: ilammy/msvc-dev-cmd@v1 | |
| with: | |
| arch: x64 | |
| - name: Setup vcpkg | |
| if: runner.os == 'Windows' | |
| run: | | |
| C:\vcpkg\bootstrap-vcpkg.bat | |
| shell: cmd | |
| - name: Install RE2 (Windows) | |
| if: runner.os == 'Windows' | |
| run: | | |
| C:\vcpkg\vcpkg install re2:x64-windows-static | |
| C:\vcpkg\vcpkg install abseil:x64-windows-static | |
| shell: cmd | |
| - name: Set Toolchain and Triplet | |
| if: runner.os == 'Windows' | |
| run: | | |
| echo "CMAKE_TOOLCHAIN_FILE=C:\vcpkg\scripts\buildsystems\vcpkg.cmake" | Out-File -FilePath $env:GITHUB_ENV -Append | |
| echo "VCPKG_TARGET_TRIPLET=x64-windows-static" | Out-File -FilePath $env:GITHUB_ENV -Append | |
| - name: Install dependencies | |
| run: npm install | |
| - name: Build native addon | |
| run: npm run build | |
| - name: Run Node.js tests | |
| run: npm test | |
| - name: Run compat tests | |
| run: npm run test:compat | |
| - name: Run Standard Schema tests | |
| run: npm run test:standard-schema | |
| test-cpp: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Install RE2 | |
| run: sudo apt-get update && sudo apt-get install -y libre2-dev libabsl-dev | |
| - name: Configure CMake | |
| run: cmake -B build -DCMAKE_BUILD_TYPE=Release | |
| - name: Build | |
| run: cmake --build build | |
| - name: Run C++ tests | |
| run: ./build/ata_tests | |
| test-suite: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| with: | |
| submodules: true | |
| - uses: actions/setup-node@v4 | |
| with: | |
| node-version: 22 | |
| - name: Install RE2 | |
| run: sudo apt-get update && sudo apt-get install -y libre2-dev libabsl-dev | |
| - name: Install dependencies | |
| run: npm install | |
| - name: Build native addon | |
| run: npm run build | |
| - name: Run JSON Schema Test Suite | |
| run: npm run test:suite | |
| test-ts: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| with: | |
| submodules: true | |
| - uses: actions/setup-node@v4 | |
| with: | |
| node-version: 22 | |
| - name: Install RE2 | |
| run: sudo apt-get update && sudo apt-get install -y libre2-dev libabsl-dev | |
| - name: Install dependencies | |
| run: npm install | |
| - name: Build native addon | |
| run: npm run build | |
| - name: Run TS generator fixtures | |
| run: npm run test:ts | |
| - name: Run TS corpus (draft 2020-12) | |
| run: npm run test:ts-corpus | |
| - name: Run TS corpus (draft 7) | |
| run: CORPUS_DRAFT=draft7 npm run test:ts-corpus | |
| - name: Run TS differential (draft 2020-12) | |
| run: npm run test:ts-differential | |
| - name: Run TS differential (draft 7) | |
| run: CORPUS_DRAFT=draft7 npm run test:ts-differential |