From 7337ed3dc4771c398e95b4efc477e65e53d50ac5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=BA=90=E6=96=87=E9=9B=A8?= <41315874+fumiama@users.noreply.github.com> Date: Wed, 25 Mar 2026 23:42:32 +0800 Subject: [PATCH] fix: ci --- .github/workflows/ci.yml | 46 +++++++++++----------------------------- 1 file changed, 12 insertions(+), 34 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index d25795c..862f751 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -62,7 +62,7 @@ jobs: - name: Add SYCL bin to PATH run: | - echo "${{ github.workspace }}/sycl_linux/bin" >> $GITHUB_PATH + (echo "${{ github.workspace }}/sycl_linux/bin"; cat $GITHUB_PATH) > $GITHUB_PATH.tmp && mv $GITHUB_PATH.tmp $GITHUB_PATH - name: Run go generate run: go generate ./... @@ -88,20 +88,27 @@ jobs: branch: auto/go-generate delete-branch: true - build: - name: Build + vet_build_test: + name: Vet & Build & Test runs-on: ${{ matrix.os }} strategy: fail-fast: false matrix: os: [ubuntu-latest, windows-latest] - go-version: ["stable"] steps: - uses: actions/checkout@v4 - uses: actions/setup-go@v5 with: - go-version: ${{ matrix.go-version }} + go-version-file: go.mod + + - name: Find and remove all .cpp files + run: | + find . -name "*.cpp" -type f -delete + shell: bash + + - name: Run go vet + run: go vet ./... - name: Build all packages run: go build ./... @@ -112,34 +119,5 @@ jobs: - name: Build cmd/func2kernel run: go build ./cmd/func2kernel - test: - name: Test - needs: build - runs-on: ${{ matrix.os }} - strategy: - fail-fast: false - matrix: - os: [ubuntu-latest, windows-latest] - go-version: ["stable"] - steps: - - uses: actions/checkout@v4 - - - uses: actions/setup-go@v5 - with: - go-version: ${{ matrix.go-version }} - - name: Run tests run: go test -v -count=1 ./... - - vet: - name: Vet - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v4 - - - uses: actions/setup-go@v5 - with: - go-version-file: go.mod - - - name: Run go vet - run: go vet ./...