generated from platypusguy/jacobin-swift
-
Notifications
You must be signed in to change notification settings - Fork 29
92 lines (79 loc) · 1.82 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
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
name: Go build and test
env:
GO111MODULE: "on"
on:
push:
paths-ignore:
- '*.md'
branches: [ main ]
pull_request:
branches: [ main ]
jobs:
nix-build-and-test:
strategy:
matrix:
os: [ubuntu-latest, macos-latest]
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v3
- name: Set up Go
uses: actions/setup-go@v4
with:
go-version: '1.21'
- name: Setup JDK
uses: actions/setup-java@v3
with:
distribution: 'oracle'
java-version: '17'
- name: Build
run: |
cd src
go build -o . -v ./...
pwd
./jacobin -h
- name: Test
run: |
export JACOBIN_TOP=`pwd`
export JACOBIN_TESTDATA=$JACOBIN_TOP/testdata
cd src
export JACOBIN_EXE=`pwd`/jacobin
go test -v ./...
- name: Codecov
uses: codecov/codecov-action@v3
windows-build-and-test:
strategy:
matrix:
os: [windows-latest]
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v3
- name: Set up Go
uses: actions/setup-go@v4
with:
go-version: '1.21'
- name: Setup JDK
uses: actions/setup-java@v3
with:
distribution: 'oracle'
java-version: '17'
- name: Build
run: |
cd src
go build -o . -v ./...
echo %CD%
dir
./jacobin -h
- name: Test
run: |
$Env:JACOBIN_TOP = $PWD
$Env:JACOBIN_TOP
$Env:JACOBIN_TESTDATA = $Env:JACOBIN_TOP
$Env:JACOBIN_TESTDATA += '\testdata'
$Env:JACOBIN_TESTDATA
cd src
$Env:JACOBIN_EXE = $Env:JACOBIN_TOP
$Env:JACOBIN_EXE += '\src\jacobin.exe'
$Env:JACOBIN_EXE
go test -v ./...
- name: Codecov
uses: codecov/codecov-action@v3