miller/.github/workflows/go.yml

45 lines
1.1 KiB
YAML

name: Miller-Go
on:
push:
branches: [ main ]
pull_request:
branches: [ main ]
jobs:
build:
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-latest, macos-latest, windows-latest]
steps:
- uses: actions/checkout@v2
- name: Set up Go
uses: actions/setup-go@v2
with:
go-version: 1.15
- name: Build
run: cd go && go build -v mlr.go
- name: Test
# In the event of needing to debug failures you can modify `./mlr regtest` verbosity
# using `-v`, `-vv`, or `-vvv`. Commit changes to this file and re-push to GitHub
# and let the GitHub Actions re-run.
run: cd go && go test -v mlr/src/... && ./mlr regtest -s 5
- name: PrepareArtifactNonWindows
if: matrix.os != 'windows-latest'
run: mkdir -p bin/${{matrix.os}} && cp go/mlr bin/${{matrix.os}}
- name: PrepareArtifactWindows
if: matrix.os == 'windows-latest'
run: mkdir -p bin/${{matrix.os}} && cp go/mlr.exe bin/${{matrix.os}}
- uses: actions/upload-artifact@v2
with:
name: mlr-${{matrix.os}}
path: bin/${{matrix.os}}/*