Implement register-based closure ctx #6653
Workflow file for this run
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
| # This workflow will build a golang project | |
| # For more information see: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-go | |
| name: Go | |
| on: | |
| push: | |
| branches: | |
| - "**" | |
| - "!dependabot/**" | |
| - "!xgopilot/**" | |
| pull_request: | |
| branches: ["**"] | |
| concurrency: | |
| group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }} | |
| cancel-in-progress: true | |
| jobs: | |
| test: | |
| continue-on-error: true | |
| timeout-minutes: 30 | |
| strategy: | |
| matrix: | |
| os: | |
| - macos-latest | |
| - ubuntu-latest | |
| llvm: [19] | |
| runs-on: ${{matrix.os}} | |
| steps: | |
| - uses: actions/checkout@v6 | |
| - name: Install dependencies | |
| uses: ./.github/actions/setup-deps | |
| with: | |
| llvm-version: ${{matrix.llvm}} | |
| - name: Clang information | |
| run: | | |
| echo $PATH | |
| which clang | |
| clang --version | |
| - name: Set up Go | |
| uses: ./.github/actions/setup-go | |
| with: | |
| go-version: "1.24.2" | |
| - name: Install further optional dependencies for demos | |
| run: | | |
| py_deps=( | |
| numpy # for github.com/goplus/lib/py/numpy | |
| torch # for github.com/goplus/lib/py/torch | |
| ) | |
| pip3.12 install --break-system-packages "${py_deps[@]}" | |
| # Align python3-embed with python-3.12-embed to avoid ABI mismatches. | |
| pcdir=$HOME/pc | |
| mkdir -p "$pcdir" | |
| libdir=$(pkg-config --variable=libdir python-3.12-embed) | |
| ln -s "$libdir/pkgconfig/python-3.12-embed.pc" "$pcdir/python3-embed.pc" | |
| echo "PKG_CONFIG_PATH=$pcdir:${PKG_CONFIG_PATH}" >> $GITHUB_ENV | |
| echo "LLGO_FULL_RPATH=true" >> $GITHUB_ENV | |
| - name: Set LLGO_ROOT | |
| run: echo "LLGO_ROOT=$GITHUB_WORKSPACE" >> $GITHUB_ENV | |
| - name: Build | |
| run: go build -v ./... | |
| - name: Test | |
| if: ${{!startsWith(matrix.os, 'macos')}} | |
| run: go test -timeout 30m ./... | |
| - name: Test with coverage | |
| if: startsWith(matrix.os, 'macos') | |
| run: go test -timeout 30m -coverprofile="coverage.txt" -covermode=atomic ./... | |
| - name: Check std symbol coverage | |
| run: bash doc/_readme/scripts/check_std_cover.sh | |
| - name: Upload coverage reports to Codecov | |
| uses: codecov/codecov-action@v5 | |
| with: | |
| token: ${{secrets.CODECOV_TOKEN}} |