fix: Unquote page contents of written_book #402
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 | |
| - dev | |
| jobs: | |
| style: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout repository | |
| uses: actions/checkout@v4 | |
| - name: Check style | |
| uses: DoozyX/clang-format-lint-action@v0.18.2 | |
| with: | |
| clangFormatVersion: 18 | |
| build: | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| os: [ubuntu-latest, macos-latest, windows-latest] | |
| runs-on: ${{ matrix.os }} | |
| needs: [style] | |
| steps: | |
| - name: Checkout repository | |
| uses: actions/checkout@v4 | |
| with: | |
| submodules: recursive | |
| fetch-depth: 0 | |
| lfs: true | |
| - name: Restore timestamps | |
| shell: bash | |
| run: bash tool/git-restore-mtime.sh | |
| - name: Checkout lfs files | |
| shell: bash | |
| run: git lfs checkout | |
| - name: Cache workspace directory | |
| id: cache | |
| uses: actions/cache@v4 | |
| with: | |
| path: build | |
| key: ${{ runner.os }}-${{ github.run_id }} | |
| restore-keys: | | |
| ${{ runner.os }}- | |
| - name: Configure | |
| shell: bash | |
| run: | | |
| cmake . -B ./build -DCMAKE_BUILD_TYPE=Release -DCMAKE_POLICY_VERSION_MINIMUM=3.5 | |
| - name: Build (Parallel) | |
| if: ${{ matrix.os != 'macos-latest' }} | |
| shell: bash | |
| run: | | |
| cmake --build ./build --target je2be-test --config Release --parallel $(nproc) | |
| - name: Build (Serial) | |
| if: ${{ matrix.os == 'macos-latest' }} | |
| shell: bash | |
| run: | | |
| cmake --build ./build --target je2be-test --config Release | |
| - name: Test | |
| shell: bash | |
| run: | | |
| test "${{ matrix.os }}" == "windows-latest" && cd build/Release | |
| test "${{ matrix.os }}" != "windows-latest" && cd build | |
| ./je2be-test --duration=true | |
| analysis: | |
| runs-on: ubuntu-latest | |
| needs: [style] | |
| permissions: | |
| actions: read | |
| contents: read | |
| security-events: write | |
| steps: | |
| - name: Checkout repository | |
| uses: actions/checkout@v4 | |
| with: | |
| submodules: recursive | |
| fetch-depth: 0 | |
| lfs: true | |
| - name: Checkout lfs files | |
| shell: bash | |
| run: git lfs checkout | |
| - name: Cache workspace directory | |
| uses: actions/cache@v4 | |
| with: | |
| path: build | |
| key: analysis-${{ github.run_id }} | |
| restore-keys: | | |
| analysis- | |
| - name: Install tools | |
| run: | | |
| wget -q -O - https://files.pvs-studio.com/etc/pubkey.txt | sudo apt-key add - | |
| sudo wget -O /etc/apt/sources.list.d/viva64.list https://files.pvs-studio.com/etc/viva64.list | |
| sudo apt update | |
| sudo apt install pvs-studio | |
| pvs-studio-analyzer credentials ${{ secrets.PVS_STUDIO_CREDENTIALS }} | |
| - name: Build | |
| run: | | |
| cmake -DCMAKE_EXPORT_COMPILE_COMMANDS=ON -B ./build . | |
| cmake --build ./build --target je2be --parallel $(nproc) | |
| - name: Analyze | |
| run: | | |
| pvs-studio-analyzer analyze -f ./build/compile_commands.json -j $(nproc) -e ./build/_deps -e ./test -e ./example | |
| - name: Convert report | |
| run: | | |
| plog-converter --excludedCodes V1042 -t sarif -o pvs-report.sarif PVS-Studio.log | |
| - name: Publish report | |
| uses: github/codeql-action/upload-sarif@v3 | |
| with: | |
| sarif_file: pvs-report.sarif | |
| category: PVS-Studio |