feat(build): support crosscompile #166
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
| name: Kodo E2E | |
| on: | |
| push: | |
| branches: | |
| - "**" | |
| - "!dependabot/**" | |
| - "!xgopilot/**" | |
| pull_request_target: | |
| branches: [ "**" ] | |
| permissions: | |
| contents: read | |
| concurrency: | |
| group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }} | |
| cancel-in-progress: false | |
| jobs: | |
| kodo-artifact: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Check out code | |
| uses: actions/checkout@v4 | |
| with: | |
| repository: ${{ github.event.pull_request.head.repo.full_name || github.repository }} | |
| ref: ${{ github.event.pull_request.head.sha || github.sha }} | |
| persist-credentials: false | |
| allow-unsafe-pr-checkout: true | |
| - name: Set up Go | |
| uses: actions/setup-go@v5 | |
| with: | |
| go-version: 1.24.x | |
| - name: Download Go modules | |
| run: go mod download | |
| - name: Check Kodo secrets | |
| env: | |
| QINIU_ACCESS_KEY: ${{ secrets.QINIU_ACCESS_KEY }} | |
| QINIU_SECRET_KEY: ${{ secrets.QINIU_SECRET_KEY }} | |
| QINIU_BUCKET: ${{ secrets.QINIU_BUCKET }} | |
| run: | | |
| test -n "$QINIU_ACCESS_KEY" | |
| test -n "$QINIU_SECRET_KEY" | |
| test -n "$QINIU_BUCKET" | |
| - name: Run Kodo artifact E2E | |
| env: | |
| QINIU_ACCESS_KEY: ${{ secrets.QINIU_ACCESS_KEY }} | |
| QINIU_SECRET_KEY: ${{ secrets.QINIU_SECRET_KEY }} | |
| QINIU_BUCKET: ${{ secrets.QINIU_BUCKET }} | |
| QINIU_PREFIX: ${{ secrets.QINIU_PREFIX }} | |
| run: go test -v -ldflags="-checklinkname=0" ./internal/artifact -run '^TestKodoArtifactE2E$' -count=1 | |
| - name: Run Kodo cache and build E2E | |
| env: | |
| QINIU_ACCESS_KEY: ${{ secrets.QINIU_ACCESS_KEY }} | |
| QINIU_SECRET_KEY: ${{ secrets.QINIU_SECRET_KEY }} | |
| QINIU_BUCKET: ${{ secrets.QINIU_BUCKET }} | |
| QINIU_PUBLIC_DOMAIN: ${{ secrets.QINIU_PUBLIC_DOMAIN }} | |
| QINIU_PREFIX: ${{ secrets.QINIU_PREFIX }} | |
| run: go test -v -ldflags="-checklinkname=0" -coverpkg=github.com/goplus/llar/internal/build/cache,github.com/goplus/llar/internal/build/http -coverprofile kodo-cache-coverage.out ./internal/build/cache ./internal/build/http ./testdata/kodo-e2e -count=1 | |
| - name: Upload Kodo cache coverage | |
| uses: codecov/codecov-action@v5 | |
| with: | |
| token: ${{ secrets.CODECOV_TOKEN }} | |
| disable_search: true | |
| files: kodo-cache-coverage.out |