Skip to content

Commit fcfd944

Browse files
authored
Added macOS and Windows builds to GitHub Actions
1 parent fb1d934 commit fcfd944

File tree

2 files changed

+79
-33
lines changed

2 files changed

+79
-33
lines changed

.github/workflows/ci.yml

Lines changed: 79 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,79 @@
1+
name: CI
2+
on: [push]
3+
jobs:
4+
5+
ubuntu-build:
6+
name: Ubuntu build
7+
runs-on: ubuntu-latest
8+
steps:
9+
- name: Set up Go 1.12
10+
uses: actions/setup-go@v1
11+
with:
12+
go-version: 1.12
13+
id: go
14+
15+
- name: Check out code into the Go module directory
16+
uses: actions/checkout@v1
17+
18+
- name: Get dependencies
19+
run: |
20+
go get -v -t -d ./...
21+
if [ -f Gopkg.toml ]; then
22+
curl https://raw.githubusercontent.com/golang/dep/master/install.sh | sh
23+
dep ensure
24+
fi
25+
26+
- name: Build
27+
run: go build -v -i -o cstest .
28+
29+
- name: Running the tests
30+
run: ./cstest -help
31+
32+
windows-build:
33+
name: Windows build
34+
runs-on: windows-latest
35+
steps:
36+
- name: Set up Go 1.12
37+
uses: actions/setup-go@v1
38+
with:
39+
go-version: 1.12
40+
id: go
41+
42+
- name: Check out code into the Go module directory
43+
uses: actions/checkout@v1
44+
45+
- name: Get dependencies
46+
run: echo stub
47+
48+
- name: Build
49+
run: go build -v -i -o cstest.exe .
50+
51+
- name: Running the tests
52+
run: cstest.exe -help
53+
54+
macOS-build:
55+
name: MacOS build
56+
runs-on: macOS-latest
57+
steps:
58+
- name: Set up Go 1.12
59+
uses: actions/setup-go@v1
60+
with:
61+
go-version: 1.12
62+
id: go
63+
64+
- name: Check out code into the Go module directory
65+
uses: actions/checkout@v1
66+
67+
- name: Get dependencies
68+
run: |
69+
go get -v -t -d ./...
70+
if [ -f Gopkg.toml ]; then
71+
curl https://raw.githubusercontent.com/golang/dep/master/install.sh | sh
72+
dep ensure
73+
fi
74+
75+
- name: Build
76+
run: go build -v -i -o cstest .
77+
78+
- name: Running the tests
79+
run: ./cstest -help

.github/workflows/go.yml

Lines changed: 0 additions & 33 deletions
This file was deleted.

0 commit comments

Comments
 (0)