Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Matrix CI #107

Merged
merged 29 commits into from
May 26, 2020
Merged
Show file tree
Hide file tree
Changes from 28 commits
Commits
Show all changes
29 commits
Select commit Hold shift + click to select a range
07d1fdf
Matrix CI
local-minimum May 25, 2020
c026f8a
Attempt 2
local-minimum May 25, 2020
4581821
Attempt 3
local-minimum May 25, 2020
de03579
Style fix
local-minimum May 25, 2020
8b67bd2
Merge branch 'master' into matrix-ci
local-minimum May 25, 2020
189600e
installing with choco maybe
local-minimum May 25, 2020
b31a1b9
Remove unnecc install and make explicit bash on next step
local-minimum May 25, 2020
eaab476
Attempt agree on where things are
local-minimum May 25, 2020
676a7ae
More tries
local-minimum May 25, 2020
ac74711
another try at getting lint to work
local-minimum May 25, 2020
819dcb6
Fix test so works same on win/linux
local-minimum May 25, 2020
49ba5a9
Fixing binaries step
local-minimum May 25, 2020
60acb86
Next try
local-minimum May 25, 2020
51a24cc
And removing macOS for now
local-minimum May 25, 2020
f269ce5
Merge branch 'master' into matrix-ci
local-minimum May 25, 2020
78c9611
artifacts should be made by make
local-minimum May 25, 2020
3e7dc72
Trying to upload files again
local-minimum May 25, 2020
6067338
Adding the bin
local-minimum May 25, 2020
c56cc09
Perhaps find files now?
local-minimum May 25, 2020
49391ca
Next place
local-minimum May 25, 2020
0183008
Further tries
local-minimum May 25, 2020
9d00b00
More info please
local-minimum May 25, 2020
1ce223e
Now?
local-minimum May 25, 2020
743b053
Hardcoded
local-minimum May 25, 2020
3aa741c
Fixing nicer names
local-minimum May 25, 2020
7408c5a
Remove comment
local-minimum May 25, 2020
7fd9976
does this work??
local-minimum May 25, 2020
6a182de
Oh revert one
local-minimum May 25, 2020
788f585
Remove mingw from linux
local-minimum May 26, 2020
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
43 changes: 30 additions & 13 deletions .github/workflows/go.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,10 @@ jobs:

build:
name: Build
runs-on: ubuntu-latest
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-latest, windows-latest, macos-latest]
steps:

- name: Set up Go 1.14
Expand All @@ -16,8 +19,9 @@ jobs:
go-version: 1.14
id: go

- name: install mingw
run : sudo apt-get install -y gcc-mingw-w64
- name: --Linux-- Install mingw
if: ${{ runner.os == 'Linux' }}
run: sudo apt-get install -y gcc-mingw-w64
local-minimum marked this conversation as resolved.
Show resolved Hide resolved

- name: Check out code into the Go module directory
uses: actions/checkout@v1
Expand All @@ -26,30 +30,43 @@ jobs:

- name: Get dependencies
run: |
export GOPATH=$(go env GOPATH)
echo "GOPATH is $GOPATH"
go get -v -t -d ./...
if [ -f Gopkg.toml ]; then
curl https://raw.githubusercontent.com/golang/dep/master/install.sh | sh
dep ensure
fi
shell: bash

- name: Build
run: make build
- name: Build & Install
run: make install
shell: bash

- name: Lint
run: make lint
shell: bash

- name: Test
run: make test

# # TODO: wait for #https://github.com/actions/virtual-environments/issues/228
# - name: Build windows
# run: CC=x86_64-w64-mingw32-gcc GOOS=windows GOARCH=amd64 CGO_ENABLED=1 go build -o rac.exe ./cmd/rac
- name: --Linux--- Upload binaries
if: ${{ runner.os == 'Linux' }}
uses: actions/upload-artifact@v2
with:
name: Rac for Linux
path: /home/runner/go/bin/rac

- name: Build linux
run: go build -o rac ./cmd/rac
- name: --macOS--- Upload binaries
if: ${{ runner.os == 'macOS' }}
uses: actions/upload-artifact@v2
with:
name: Rac for macOS
path: /Users/runner/go/bin/rac

- name: binaries
- name: --Windows-- Upload binaries
if: ${{ runner.os == 'Windows' }}
uses: actions/upload-artifact@v2
with:
name: CLI
path: ./rac*
name: Rac for Windows
path: C:\Users\runneradmin\go\bin\rac.exe
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ build:
$(GOBUILD) ./...
lint: tools
${GOVET} ./...
${GOLINT} ./...
${GOLINT} -set_exit_status ./...
test:
$(GOTEST) ./...
install:
Expand Down
2 changes: 2 additions & 0 deletions internal/exports/aws_s3_writer_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ import (
"io/ioutil"
"os"
"path/filepath"
"strings"
"sync"
"testing"

Expand Down Expand Up @@ -198,6 +199,7 @@ func TestAWSS3CallbackFactory(t *testing.T) {
var idxUp = 0

var uploader = func(uploader *s3manager.Uploader, key string, bodyBuffer io.Reader) {
key = strings.ReplaceAll(key, "\\", "/")
buf, _ := ioutil.ReadAll(bodyBuffer)
if idxUp >= len(tt.uploads) {
t.Errorf(
Expand Down