don’t include toolchain directive, support go 1.22+ until 1.24 is rel… #294
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: | |
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' }} |