Merge pull request #54 from session-foundation/fix-add-rangeproof-pro… #245
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: libession-util-nodejs build test | |
| on: | |
| push: | |
| branches: | |
| - main | |
| pull_request: | |
| branches: | |
| - main | |
| concurrency: | |
| group: ${{ github.workflow }} | |
| cancel-in-progress: true | |
| jobs: | |
| build: | |
| runs-on: ${{ matrix.os }} | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| os: [windows-2022, macos-15-intel, macos-14, ubuntu-24.04] | |
| env: | |
| SIGNAL_ENV: production | |
| GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
| steps: | |
| - run: git config --global core.autocrlf false | |
| - name: Checkout git repo | |
| uses: actions/checkout@v4 | |
| with: | |
| submodules: "recursive" | |
| - name: Setup ccache | |
| uses: hendrikmuhs/ccache-action@5ebbd400eff9e74630f759d94ddd7b6c26299639 # v1.2 | |
| with: | |
| key: ${{ matrix.os }}-ccache-libsession-util-nodejs-${{ github.head_ref || github.ref_name }} | |
| # if the exact key is not found, fallback to one matching our cache_suffix | |
| restore-keys: ${{ matrix.os }}-ccache-libsession-util-nodejs- | |
| - name: Setup pnpm | |
| uses: pnpm/action-setup@41ff72655975bd51cab0327fa583b6e92b6d3061 # v4 | |
| - name: Setup pnpm hoisted node-linker (Windows Only) | |
| if: runner.os == 'Windows' | |
| shell: bash | |
| run: pnpm config set node-linker hoisted | |
| - name: Setup node.js | |
| uses: actions/setup-node@2028fbc5c25fe9cf00d9f06a71cc4710d4507903 # v6 | |
| with: | |
| node-version-file: ".nvmrc" | |
| cache: "pnpm" | |
| cache-dependency-path: "pnpm-lock.yaml" | |
| - name: Install correct clang versions | |
| if: runner.os == 'Linux' | |
| run: sudo apt update && sudo apt search clang && sudo apt install clang-format-19 | |
| shell: bash | |
| - name: Install node | |
| uses: actions/setup-node@v3 | |
| with: | |
| node-version-file: ".nvmrc" | |
| - uses: actions/setup-python@v4 | |
| with: | |
| python-version: "3.11" | |
| - name: Add msbuild to PATH | |
| uses: microsoft/setup-msbuild@v1.3.1 | |
| if: runner.os == 'Windows' | |
| - name: build libsession-util-nodejs | |
| shell: bash | |
| run: pnpm install --frozen-lockfile | |
| env: | |
| CMAKE_C_COMPILER_LAUNCHER: ccache | |
| CMAKE_CXX_COMPILER_LAUNCHER: ccache | |
| - name: Check formatting | |
| if: runner.os == 'Linux' | |
| run: clang-format-19 --dry-run --Werror src/*.cpp include/*.hpp src/**/*.cpp include/**/*.hpp | |
| shell: bash | |
| - name: Ensure pnpm-lock.yaml has no duplicates | |
| run: pnpm dedupe --check | |
| - name: Validate formatting & linting changed no files | |
| run: git diff --exit-code |