| 1 |
name: Build Cross OS |
| 2 |
|
| 3 |
on: |
| 4 |
push: |
| 5 |
branches: |
| 6 |
- master |
| 7 |
pull_request: |
| 8 |
|
| 9 |
jobs: |
| 10 |
|
| 11 |
cross: |
| 12 |
name: Go |
| 13 |
runs-on: ${{ matrix.os }} |
| 14 |
defaults: |
| 15 |
run: |
| 16 |
working-directory: ${{ github.workspace }}/go/src/github.com/traefik/yaegi |
| 17 |
|
| 18 |
strategy: |
| 19 |
matrix: |
| 20 |
go-version: [ oldstable, stable ] |
| 21 |
os: [ubuntu-latest, macos-latest, windows-latest] |
| 22 |
|
| 23 |
include: |
| 24 |
- os: ubuntu-latest |
| 25 |
go-path-suffix: /go |
| 26 |
- os: macos-latest |
| 27 |
go-path-suffix: /go |
| 28 |
- os: windows-latest |
| 29 |
go-path-suffix: \go |
| 30 |
|
| 31 |
steps: |
| 32 |
|
| 33 |
- name: Checkout code |
| 34 |
uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 |
| 35 |
with: |
| 36 |
path: go/src/github.com/traefik/yaegi |
| 37 |
|
| 38 |
|
| 39 |
- name: Set up Go ${{ matrix.go-version }} |
| 40 |
uses: actions/setup-go@40f1582b2485089dde7abd97c1529aa768e1baff |
| 41 |
with: |
| 42 |
go-version: ${{ matrix.go-version }} |
| 43 |
stable: true |
| 44 |
|
| 45 |
- name: Setup GOPATH |
| 46 |
run: go env -w GOPATH=${{ github.workspace }}${{ matrix.go-path-suffix }} |
| 47 |
|
| 48 |
|
| 49 |
|
| 50 |
|
| 51 |
|
| 52 |
|
| 53 |
|
| 54 |
- name: Build |
| 55 |
run: go build -race -v -ldflags "-s -w" -trimpath |