Repository navigation
refactor: move address resolution and ownership to AddressManager #5620
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 All | |
| on: | |
| push: | |
| branches: | |
| - master | |
| pull_request: | |
| workflow_dispatch: | |
| merge_group: | |
| concurrency: | |
| group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }} | |
| cancel-in-progress: true | |
| permissions: | |
| actions: write | |
| checks: write | |
| contents: read | |
| jobs: | |
| test: | |
| env: | |
| NIMBLE_COMMIT: aa8e6ea09ecac774b6fad42552569ce07bef37ec # v0.24.1 | |
| timeout-minutes: 65 | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| platform: | |
| - os: linux | |
| cpu: amd64 | |
| cc: gcc | |
| log_level: TRACE | |
| - os: linux-gcc-14 | |
| cpu: amd64 | |
| cc: gcc | |
| log_level: INFO | |
| - os: macos-15 | |
| cpu: arm64 | |
| cc: clang | |
| log_level: INFO | |
| - os: windows | |
| cpu: amd64 | |
| cc: clang | |
| log_level: INFO | |
| - os: windows | |
| cpu: amd64 | |
| cc: gcc | |
| log_level: INFO | |
| nim: | |
| - ref: v2.2.6 | |
| memory_management: refc | |
| - ref: v2.2.14 | |
| memory_management: refc | |
| - ref: v2.2.14 | |
| 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-15 | |
| builder: macos-15 | |
| shell: bash | |
| - platform: | |
| os: windows | |
| cc: clang | |
| builder: windows-2022 | |
| shell: bash | |
| - platform: | |
| os: windows | |
| cc: gcc | |
| builder: windows-2022 | |
| shell: "msys2 {0}" | |
| defaults: | |
| run: | |
| shell: ${{ matrix.shell }} | |
| name: "${{ matrix.platform.os }}-${{ matrix.platform.cpu }} (Nim ${{ matrix.nim.ref }} / ${{ matrix.platform.cc }} / ${{ matrix.nim.memory_management }})" | |
| runs-on: ${{ matrix.builder }} | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v6 | |
| with: | |
| persist-credentials: false | |
| submodules: true | |
| - 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: Setup Windows dependencies | |
| uses: "./.github/actions/setup_windows" | |
| with: | |
| cpu: ${{ matrix.platform.cpu }} | |
| cc: ${{ matrix.platform.cc }} | |
| shell: ${{ matrix.shell }} | |
| - name: Use gcc 14 | |
| if: ${{ matrix.platform.os == 'linux-gcc-14'}} | |
| run: | | |
| sudo update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-14 14 | |
| sudo update-alternatives --set gcc /usr/bin/gcc-14 | |
| - name: Restore dependencies from cache | |
| uses: "./.github/actions/install_test_deps" | |
| with: | |
| os: ${{ matrix.platform.os }} | |
| cpu: ${{ matrix.platform.cpu }} | |
| cc: ${{ matrix.platform.cc }} | |
| nim_ref: ${{ matrix.nim.ref }} | |
| shell: ${{ matrix.shell }} | |
| - name: Setup deps | |
| run: | | |
| NIM_VERSION="${{ matrix.nim.ref }}" | |
| NIM_VERSION="${NIM_VERSION#v}" | |
| make NIM_VERSION="$NIM_VERSION" setup | |
| - name: Restore build cache | |
| id: nimcache-restore | |
| uses: actions/cache/restore@v5 | |
| with: | |
| path: nimcache | |
| key: nimcache-test_all-${{ matrix.platform.os }}-${{ matrix.platform.cpu }}-${{ matrix.platform.cc }}-${{ matrix.nim.ref }}-${{ matrix.nim.memory_management }}-${{ github.run_id }} | |
| restore-keys: | | |
| nimcache-test_all-${{ matrix.platform.os }}-${{ matrix.platform.cpu }}-${{ matrix.platform.cc }}-${{ matrix.nim.ref }}-${{ matrix.nim.memory_management }} | |
| - name: Build test_all | |
| id: build-test-all | |
| run: | | |
| NIMFLAGS="--nimcache:nimcache/test_all --mm:${{ matrix.nim.memory_management }} --skipUserCfg" | |
| NIMFLAGS="$NIMFLAGS -d:chronicles_log_level=${{ matrix.platform.log_level }}" | |
| if [[ '${{ matrix.platform.cc }}' == 'clang' ]]; then | |
| NIMFLAGS="$NIMFLAGS --cc:clang" | |
| fi | |
| nim c $NIMFLAGS ./tests/test_all | |
| - name: Save build cache | |
| uses: actions/cache/save@v5 | |
| if: github.event_name == 'push' && github.ref == 'refs/heads/master' | |
| with: | |
| path: nimcache | |
| key: ${{ steps.nimcache-restore.outputs.cache-primary-key }} | |
| - name: Prune old nimcache entries | |
| if: github.event_name == 'push' && github.ref == 'refs/heads/master' | |
| env: | |
| GH_TOKEN: ${{ github.token }} | |
| run: | | |
| PREFIX="nimcache-test_all-${{ matrix.platform.os }}-${{ matrix.platform.cpu }}-${{ matrix.platform.cc }}-${{ matrix.nim.ref }}-${{ matrix.nim.memory_management }}" | |
| KEEP="${{ steps.nimcache-restore.outputs.cache-primary-key }}" | |
| gh cache list --ref "${{ github.ref }}" --limit 100 --json id,key \ | |
| --jq ".[] | select(.key | startswith(\"$PREFIX\")) | select(.key != \"$KEEP\") | .id" \ | |
| | xargs -r -n1 gh cache delete | |
| - name: Run tests | |
| id: run-tests | |
| run: | | |
| ./tests/test_all --output-level=VERBOSE --console --xml:tests/results_test_all.xml | |
| - name: Fix xml newlines | |
| if: ${{ !cancelled() && steps.run-tests.outcome == 'failure' }} | |
| run: | | |
| nim c -r tools/fix_xml_newlines.nim | |
| - name: Test Report | |
| uses: dorny/test-reporter@v2 | |
| if: ${{ !cancelled() && steps.run-tests.outcome == 'failure' }} | |
| with: | |
| name: Test Report | |
| path: tests/results_*.xml | |
| reporter: jest-junit | |
| list-suites: 'failed' | |
| list-tests: 'failed' | |
| fail-on-error: 'false' | |
| # orc + -d:useMalloc is the only combination where ASan sees Nim heap objects. | |
| test-asan: | |
| env: | |
| NIMBLE_COMMIT: aa8e6ea09ecac774b6fad42552569ce07bef37ec # v0.24.1 | |
| NIM_REF: v2.2.14 | |
| permissions: | |
| actions: write | |
| checks: write | |
| contents: read | |
| timeout-minutes: 65 | |
| defaults: | |
| run: | |
| shell: bash | |
| name: "linux-amd64 (Nim v2.2.14 / gcc / orc / asan)" | |
| runs-on: ubuntu-22.04 | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v6 | |
| with: | |
| persist-credentials: false | |
| submodules: true | |
| - name: Setup Nim | |
| uses: "./.github/actions/install_nim" | |
| with: | |
| os: linux | |
| cpu: amd64 | |
| shell: bash | |
| nim_ref: ${{ env.NIM_REF }} | |
| - name: Restore dependencies from cache | |
| uses: "./.github/actions/install_test_deps" | |
| with: | |
| os: linux | |
| cpu: amd64 | |
| cc: gcc | |
| nim_ref: ${{ env.NIM_REF }} | |
| shell: bash | |
| - name: Setup deps | |
| run: | | |
| NIM_VERSION="${{ env.NIM_REF }}" | |
| NIM_VERSION="${NIM_VERSION#v}" | |
| make NIM_VERSION="$NIM_VERSION" setup | |
| - name: Restore build cache | |
| id: nimcache-restore | |
| uses: actions/cache/restore@v5 | |
| with: | |
| path: nimcache | |
| key: nimcache-test_all_asan-linux-amd64-gcc-${{ env.NIM_REF }}-orc-${{ github.run_id }} | |
| restore-keys: | | |
| nimcache-test_all_asan-linux-amd64-gcc-${{ env.NIM_REF }}-orc | |
| - name: Build test_all | |
| run: | | |
| NIMFLAGS="--nimcache:nimcache/test_all_asan --mm:orc -d:useMalloc --skipUserCfg" | |
| NIMFLAGS="$NIMFLAGS -d:chronicles_log_level=INFO" | |
| NIMFLAGS="$NIMFLAGS --passC:-fno-omit-frame-pointer --passC:-fsanitize=address --passL:-fsanitize=address" | |
| nim c $NIMFLAGS ./tests/test_all | |
| - name: Save build cache | |
| uses: actions/cache/save@v5 | |
| if: github.event_name == 'push' && github.ref == 'refs/heads/master' | |
| with: | |
| path: nimcache | |
| key: ${{ steps.nimcache-restore.outputs.cache-primary-key }} | |
| - name: Prune old nimcache entries | |
| if: github.event_name == 'push' && github.ref == 'refs/heads/master' | |
| env: | |
| GH_TOKEN: ${{ github.token }} | |
| run: | | |
| PREFIX="nimcache-test_all_asan-linux-amd64-gcc-${{ env.NIM_REF }}-orc" | |
| KEEP="${{ steps.nimcache-restore.outputs.cache-primary-key }}" | |
| gh cache list --ref "${{ github.ref }}" --limit 100 --json id,key \ | |
| --jq ".[] | select(.key | startswith(\"$PREFIX\")) | select(.key != \"$KEEP\") | .id" \ | |
| | xargs -r -n1 gh cache delete | |
| - name: Run tests | |
| id: run-tests | |
| # orc frees at collection time, so LeakSanitizer reports live objects. | |
| env: | |
| ASAN_OPTIONS: detect_leaks=0 | |
| run: | | |
| ./tests/test_all --output-level=VERBOSE --console --xml:tests/results_test_all_asan.xml | |
| - name: Fix xml newlines | |
| if: ${{ !cancelled() && steps.run-tests.outcome == 'failure' }} | |
| run: | | |
| nim c -r tools/fix_xml_newlines.nim | |
| - name: Test Report | |
| uses: dorny/test-reporter@v2 | |
| if: ${{ !cancelled() && steps.run-tests.outcome == 'failure' }} | |
| with: | |
| name: Test Report (asan) | |
| path: tests/results_test_all_asan.xml | |
| reporter: jest-junit | |
| list-suites: 'failed' | |
| list-tests: 'failed' | |
| fail-on-error: 'false' |