fix(endpoint): route shared-socket QUIC packets by destination CID #404
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: test | |
| on: | |
| push: | |
| branches: | |
| - master | |
| pull_request: | |
| merge_group: | |
| workflow_dispatch: | |
| concurrency: | |
| group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }} | |
| cancel-in-progress: true | |
| jobs: | |
| test: | |
| timeout-minutes: 90 | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| platform: | |
| - os: linux | |
| cpu: amd64 | |
| - os: linux | |
| cpu: i386 | |
| - os: linux-gcc-14 | |
| cpu: amd64 | |
| - os: macos-14 | |
| cpu: arm64 | |
| - os: windows | |
| cpu: amd64 | |
| nim: | |
| - ref: version-2-0 | |
| memory_management: refc | |
| - ref: version-2-2 | |
| memory_management: refc | |
| - ref: version-2-2 | |
| memory_management: orc | |
| include: | |
| - platform: | |
| os: linux | |
| builder: ubuntu-22.04 | |
| shell: bash | |
| - platform: | |
| os: linux-gcc-14 | |
| builder: ubuntu-24.04 | |
| shell: bash | |
| - platform: | |
| os: macos-14 | |
| builder: macos-14 | |
| shell: bash | |
| - platform: | |
| os: windows | |
| builder: windows-2022 | |
| shell: bash | |
| defaults: | |
| run: | |
| shell: ${{ matrix.shell }} | |
| name: "${{ matrix.platform.os }}-${{ matrix.platform.cpu }} (Nim ${{ matrix.nim.ref }} --mm=${{ matrix.nim.memory_management }})" | |
| runs-on: ${{ matrix.builder }} | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v4 | |
| with: | |
| submodules: "recursive" | |
| - name: Restore llvm-mingw (Windows) from cache | |
| if: runner.os == 'Windows' | |
| id: windows-mingw-cache | |
| uses: actions/cache@v4 | |
| with: | |
| path: external/mingw-${{ matrix.platform.cpu }} | |
| key: 'mingw-llvm-17-${{ matrix.platform.cpu }}' | |
| - name: Install llvm-mingw dependency (Windows) | |
| if: > | |
| steps.windows-mingw-cache.outputs.cache-hit != 'true' && | |
| runner.os == 'Windows' | |
| run: | | |
| mkdir -p external | |
| MINGW_BASE="https://github.com/mstorsjo/llvm-mingw/releases/download/20230905" | |
| MINGW_URL="$MINGW_BASE/llvm-mingw-20230905-ucrt-x86_64.zip" | |
| curl -L "$MINGW_URL" -o "external/mingw-${{ matrix.platform.cpu }}.zip" | |
| 7z x -y "external/mingw-${{ matrix.platform.cpu }}.zip" -oexternal/mingw-${{ matrix.platform.cpu }}/ | |
| mv external/mingw-${{ matrix.platform.cpu }}/**/* ./external/mingw-${{ matrix.platform.cpu }} | |
| - name: Path to cached dependencies (Windows) | |
| if: > | |
| runner.os == 'Windows' | |
| run: | | |
| echo '${{ github.workspace }}'"/external/mingw-${{ matrix.platform.cpu }}/bin" >> $GITHUB_PATH | |
| echo "." >> $GITHUB_PATH | |
| - name: Install nasm (Windows) | |
| if: runner.os == 'Windows' | |
| shell: pwsh | |
| run: | | |
| choco install nasm --no-progress -y | |
| "C:\Program Files\NASM" | Out-File -FilePath $Env:GITHUB_PATH -Encoding utf8 -Append | |
| - name: Setup Nim | |
| uses: "./.github/actions/install_nim" | |
| with: | |
| os: ${{ matrix.platform.os }} | |
| cpu: ${{ matrix.platform.cpu }} | |
| shell: ${{ matrix.shell }} | |
| nim_ref: ${{ matrix.nim.ref }} | |
| - name: Restore deps from cache | |
| id: deps-cache | |
| uses: actions/cache@v3 | |
| with: | |
| path: nimbledeps | |
| # Using nim.ref as a simple way to differentiate between nimble using the "pkgs" or "pkgs2" directories. | |
| # The change happened on Nimble v0.14.0. Also forcing the deps to be reinstalled on each os and cpu. | |
| key: nimbledeps-${{ matrix.nim.ref }}-${{ matrix.builder }}-${{ matrix.platform.cpu }}-${{ hashFiles('.pinned') }} # hashFiles returns a different value on windows | |
| - name: Install deps | |
| if: ${{ steps.deps-cache.outputs.cache-hit != 'true' }} | |
| run: | | |
| nimble install | |
| - name: Use gcc 14 | |
| if: ${{ matrix.platform.os == 'linux-gcc-14'}} | |
| run: | | |
| # Add GCC-14 to alternatives | |
| sudo update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-14 14 | |
| # Set GCC-14 as the default | |
| sudo update-alternatives --set gcc /usr/bin/gcc-14 | |
| - name: Run tests | |
| run: | | |
| nim --version | |
| nimble --version | |
| gcc --version | |
| export NIMFLAGS="${NIMFLAGS} --mm:${{ matrix.nim.memory_management }}" | |
| if [[ '${{ runner.os }}' == 'Windows' ]]; then | |
| export NIMFLAGS="${NIMFLAGS} --cc:clang" | |
| fi | |
| nimble test --styleCheck:off --verbose --debug |