Golang pivot gui #11
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: Build and Test | |
on: | |
push: | |
branches: | |
- main | |
pull_request: | |
branches: | |
- main | |
jobs: | |
build_and_test: | |
runs-on: ${{ matrix.os }} | |
strategy: | |
matrix: | |
go-version: [1.23] | |
os: [ubuntu-latest, windows-latest, macos-latest] | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v2 | |
- name: Set up Go | |
uses: actions/setup-go@v2 | |
with: | |
go-version: ${{ matrix.go-version }} | |
- name: Install dependencies (Linux) | |
if: matrix.os == 'ubuntu-latest' | |
run: | | |
sudo apt-get update | |
sudo apt-get install -y build-essential libgl1-mesa-dev | |
- name: Install dependencies (Windows) | |
if: matrix.os == 'windows-latest' | |
run: | | |
choco install mingw | |
go get -u github.com/go-gl/glfw/v3.3/glfw | |
- name: Install dependencies (macOS) | |
if: matrix.os == 'macos-latest' | |
run: | | |
brew install glew | |
go get -u github.com/go-gl/gl/v4.1-core/gl | |
- name: Install dependencies | |
run: | | |
go mod download -x | |
- name: Build (Linux) | |
if: matrix.os == 'ubuntu-latest' | |
run: | | |
make build-linux | |
- name: Build (Windows) | |
if: matrix.os == 'windows-latest' | |
run: | | |
make build-windows | |
- name: Build (macOS) | |
if: matrix.os == 'macos-latest' | |
run: | | |
make build-darwin | |
- name: Run tests | |
run: | | |
go test -v -coverprofile=coverage.out ./... | |
- name: Upload build artifacts | |
if: success() | |
uses: actions/upload-artifact@v3 | |
with: | |
name: ${{ matrix.os }}-build | |
path: build/ | |
- name: Upload coverage report | |
if: success() | |
uses: actions/upload-artifact@v3 | |
with: | |
name: coverage-report | |
path: coverage.out | |