-
-
Notifications
You must be signed in to change notification settings - Fork 4
63 lines (54 loc) · 1.68 KB
/
build.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
name: Build
on:
- pull_request
jobs:
build:
strategy:
matrix:
include:
- os: ubuntu-latest
goos: linux
goarch: amd64
- os: macos-latest
goos: darwin
goarch: amd64
- os: windows-latest
goos: windows
goarch: 386
cgo-enabled: 0
extension: .exe
- os: windows-latest
goos: windows
goarch: amd64
cgo-enabled: 0
extension: .exe
fail-fast: false
runs-on: ${{ matrix.os }}
name: ${{ matrix.goos }}-${{ matrix.goarch }}
env:
GOOS: ${{ matrix.goos }}
GOARCH: ${{ matrix.goarch }}
CGO_ENABLED: ${{ matrix.cgo-enabled }}
steps:
- name: Install libfuse (Linux)
if: ${{ matrix.goos == 'linux' }}
run: sudo apt-get install libfuse-dev
- name: Install osxfuse (Mac)
if: ${{ matrix.goos == 'darwin' }}
run: brew cask install osxfuse
- name: Install WinFsp (Windows)
if: ${{matrix.goos == 'windows' }}
run: choco install winfsp
- name: Install Go
uses: actions/setup-go@v2
- name: Checkout
uses: actions/checkout@v2
- name: Download dependencies
run: go mod download
- name: Build
run: go build -o dist/kubefs-${{ matrix.goos }}-${{ matrix.goarch }}${{ matrix.extension }} .
- name: Upload build artifacts
uses: actions/upload-artifact@v2
with:
name: kubefs-${{ matrix.goos }}-${{ matrix.goarch }}${{ matrix.extension }}
path: dist/kubefs-${{ matrix.goos }}-${{ matrix.goarch }}${{ matrix.extension }}