-
Notifications
You must be signed in to change notification settings - Fork 16
52 lines (44 loc) · 1.21 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
name: Dockerfile Build
on:
push:
pull_request:
jobs:
build-binaries:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v2
- name: Build Container
run: |
make container-init
- name: Run Container to Build Binaries
run: |
docker run --rm -v $(pwd):/fioctl fioctl-build sh -c "git config --global --add safe.directory /fioctl && make build"
- name: Archive Binaries
uses: actions/upload-artifact@v2
with:
name: binaries
path: bin/
test:
needs: build-binaries
strategy:
matrix:
include:
- os: ubuntu-latest
binary: fioctl-linux-amd64
- os: windows-latest
binary: fioctl-windows-amd64.exe
- os: macos-latest
binary: fioctl-darwin-amd64
runs-on: ${{ matrix.os }}
steps:
- name: Download Binaries
uses: actions/download-artifact@v2
with:
name: binaries
path: bin/
- name: Set Execute Permission
run: chmod +x ./bin/${{ matrix.binary }}
if: runner.os != 'Windows'
- name: Test Binary
run: ./bin/${{ matrix.binary }} logout