Update GoMLX dependencies for github.com/gomlx/go-xla/cmd/pjrt_installer #196
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: "Tests(linux/amd64, ubuntu latest)" | |
| permissions: | |
| # read|write|none | |
| actions: read | |
| checks: read | |
| contents: write | |
| deployments: read | |
| # id-token: read --> doesn't work | |
| issues: read | |
| discussions: read | |
| packages: read | |
| pages: read | |
| pull-requests: write | |
| repository-projects: read | |
| security-events: read | |
| statuses: read | |
| on: | |
| push: | |
| branches: [main] | |
| pull_request: | |
| branches: [main] | |
| # Allows you to run this workflow manually from the Actions tab | |
| workflow_dispatch: | |
| jobs: | |
| test: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v6 | |
| - name: Install Go | |
| uses: actions/setup-go@v6 | |
| with: | |
| go-version: "1.26.x" | |
| - name: Test with AutoInstall CPU PJRT plugin | |
| env: | |
| GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
| run: | | |
| go test ./compute/xla -test.v -test.count=1 | |
| # See file pkg/pjrt/cpuversion.go for the default version of the CPU PJRT plugin to use. | |
| - name: Install PJRT plugin | |
| env: | |
| GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
| shell: bash | |
| run: | | |
| (cd ./cmd/pjrt_installer && go install .) | |
| export CPU_VERSION="$(sed -n 's/.*var DefaultCPUVersion = "\(.*\)".*/\1/p' ./internal/utils/utils.go)" | |
| sudo env GH_TOKEN=$GH_TOKEN $(go env GOPATH)/bin/pjrt_installer -plugin cpu -version "${CPU_VERSION}" -path /usr/local/lib/go-xla | |
| # When adding static linking or dynamic linking at load time: | |
| # sudo ln -sf /usr/local/lib/go-xla/libpjrt* /usr/lib/x86_64-linux-gnu/ | |
| - name: Test | |
| env: | |
| GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
| run: | | |
| go test ./... | |
| # - name: Go Coverage Badge | |
| # if: github.ref == 'refs/heads/main' | |
| # uses: tj-actions/coverage-badge-go@v2 | |
| # with: | |
| # green: 80 | |
| # filename: docs/coverage.out | |
| # - name: Commit README.md changes | |
| # if: github.ref == 'refs/heads/main' | |
| # run: | | |
| # if git diff --quiet -- 'README.md' ; then | |
| # echo "README.md not modified." | |
| # else | |
| # git config --local user.email "action@github.com" | |
| # git config --local user.name "GitHub Action" | |
| # git add README.md | |
| # git commit -m "chore: Updated coverage badge." | |
| # fi | |
| # - name: Push Changes | |
| # if: github.ref == 'refs/heads/main' | |
| # uses: ad-m/github-push-action@master | |
| # with: | |
| # github_token: ${{ github.token }} | |
| # branch: ${{ github.ref }} |