-
Notifications
You must be signed in to change notification settings - Fork 93
39 lines (39 loc) · 1.24 KB
/
go.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
name: Build and Test
on:
push:
pull_request:
workflow_dispatch:
inputs:
debug_enabled:
type: boolean
description: 'Run the build with tmate debugging enabled (https://github.com/marketplace/actions/debugging-with-tmate)'
required: false
default: false
jobs:
build:
name: Build and Test
runs-on: ${{ matrix.os }}
strategy:
matrix:
go: [stable, oldstable]
os: [ubuntu-latest, windows-latest]
steps:
- name: Set git to use LF
run: |
git config --global core.autocrlf false
git config --global core.eol lf
- uses: actions/checkout@v4
- name: Set up Go
uses: actions/setup-go@v4
with:
go-version: ${{ matrix.go }}
# Enable tmate debugging of manually-triggered workflows if the input option was provided
- name: Setup tmate session
uses: mxschmitt/action-tmate@v3
if: ${{ github.event_name == 'workflow_dispatch' && inputs.debug_enabled }}
- name: Build and Test (Linux and macOS)
run: ./scripts/ci.sh
if: ${{ matrix.os != 'windows-latest' }}
- name: Build and Test (Windows)
run: .\scripts\ci.ps1
if: ${{ matrix.os == 'windows-latest' }}