Fix ci #1017
Workflow file for this run
This file contains 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 | |
on: | |
push: | |
branches: | |
- '**' | |
paths: | |
- '**.yml' | |
- '**.go' | |
- '**.mod' | |
- '**.sum' | |
- '**.flv' | |
- '**.mp4' | |
jobs: | |
buildtest: | |
name: test_ubuntu_go | |
runs-on: ubuntu-latest | |
strategy: | |
matrix: | |
go: [ '1.24' ] | |
steps: | |
- name: Set up Go${{ matrix.go }} | |
uses: actions/setup-go@v5 | |
with: | |
go-version: ${{ matrix.go }} | |
- name: Check out code | |
uses: actions/checkout@v4 | |
with: | |
lfs: true | |
- name: Checkout LFS objects | |
run: git lfs checkout | |
- name: golangci-lint | |
uses: golangci/golangci-lint-action@v6 | |
with: | |
args: --timeout 5m --verbose | |
- name: Test | |
run: | | |
sudo apt-get update | |
sudo apt-get install libgtk-3-dev libcairo2-dev libglib2.0-dev | |
go get . | |
go mod vendor | |
CGO_ENABLED=0 go test -v --cover -coverprofile=coverage ./... | |
- name: Codecov | |
uses: codecov/codecov-action@v4 | |
with: | |
token: ${{secrets.CODECOV_TOKEN}} | |
file: coverage | |
- name: zip | |
run: zip -q -r vendor.zip vendor | |
- name: Upload a Build Artifact | |
uses: actions/upload-artifact@v4 | |
with: | |
name: vendor.zip | |
path: ./vendor.zip | |
u-build: | |
name: build_ubuntu_go | |
needs: [buildtest] | |
runs-on: ubuntu-latest | |
strategy: | |
matrix: | |
go: [ '1.24' ] | |
steps: | |
- name: Set up Go${{ matrix.go }} | |
uses: actions/setup-go@v5 | |
with: | |
go-version: ${{ matrix.go }} | |
- name: Check out code | |
uses: actions/checkout@v4 | |
with: | |
lfs: true | |
- name: Checkout LFS objects | |
run: git lfs checkout | |
- name: Build | |
run: | | |
git rev-parse --short HEAD > CV/VERSION | |
cd demo | |
sudo apt-get update | |
sudo apt-get install libgtk-3-dev libcairo2-dev libglib2.0-dev | |
go get . | |
CGO_ENABLED=0 go build -pgo=auto -v -buildmode=exe main.go | |
- name: zip | |
run: zip -q -r ubuntu_go${{ matrix.go }}.zip demo | |
- name: Upload a Build Artifact | |
uses: actions/upload-artifact@v4 | |
with: | |
name: ubuntu_go${{ matrix.go }}.zip | |
path: ./ubuntu_go${{ matrix.go }}.zip | |
w-build: | |
name: build_windows_go | |
needs: [buildtest] | |
runs-on: windows-latest | |
strategy: | |
matrix: | |
go: [ '1.24' ] | |
steps: | |
- name: Set up Go${{ matrix.go }} | |
uses: actions/setup-go@v5 | |
with: | |
go-version: ${{ matrix.go }} | |
- name: Check out code | |
uses: actions/checkout@v4 | |
with: | |
lfs: true | |
- name: Checkout LFS objects | |
run: git lfs checkout | |
- name: Build | |
run: | | |
git rev-parse --short HEAD > CV/VERSION | |
cd demo | |
go get . | |
set CGO_ENABLED=0 | |
go build -pgo=auto -v -buildmode=exe main.go | |
- name: zip | |
run: .\7za.exe a -r .\windows_go${{ matrix.go }}.zip ./demo | |
- name: Upload a Build Artifact | |
uses: actions/upload-artifact@v4 | |
with: | |
name: windows_go${{ matrix.go }}.zip | |
path: ./windows_go${{ matrix.go }}.zip | |
mac-build: | |
name: build_macos_go | |
needs: [buildtest] | |
runs-on: macos-latest | |
strategy: | |
matrix: | |
go: [ '1.24' ] | |
steps: | |
- name: Set up Go${{ matrix.go }} | |
uses: actions/setup-go@v5 | |
with: | |
go-version: ${{ matrix.go }} | |
- name: Check out code | |
uses: actions/checkout@v4 | |
with: | |
lfs: true | |
- name: Checkout LFS objects | |
run: git lfs checkout | |
- name: Build | |
run: | | |
git rev-parse --short HEAD > CV/VERSION | |
cd demo | |
go get . | |
set CGO_ENABLED=0 | |
go build -pgo=auto -v -buildmode=exe main.go | |
- name: zip | |
run: zip -q -r macos_go${{ matrix.go }}.zip demo | |
- name: Upload a Build Artifact | |
uses: actions/upload-artifact@v4 | |
with: | |
name: macos_go${{ matrix.go }}.zip | |
path: ./macos_go${{ matrix.go }}.zip |