-
Notifications
You must be signed in to change notification settings - Fork 104
85 lines (66 loc) · 2.08 KB
/
Copy pathci.yml
File metadata and controls
85 lines (66 loc) · 2.08 KB
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
name: ci
on:
# build pushes to master
push:
branches:
- '*'
# build PRs from forks
pull_request:
jobs:
test:
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [macos-latest, ubuntu-latest]
go-version: [1.20.1]
shell: [/bin/bash, /bin/zsh]
name: ${{ matrix.os }} / go-${{ matrix.go-version }} / ${{ matrix.shell }}
steps:
- uses: actions/setup-go@v3
with:
go-version: ${{ matrix.go-version }}
- uses: ruby/setup-ruby@v1
with:
ruby-version: 3
- run: gem install puma
- uses: actions/checkout@v3
- if: contains(matrix.os, 'ubuntu')
run: sudo apt install zsh
- if: contains(matrix.os, 'macos')
run: |
sw_vers
sudo mkdir -p /etc/resolver;
sudo chmod 0775 /etc/resolver;
sudo chown :staff /etc/resolver;
- run: go mod download
- run: go test -v -race -coverprofile=coverage.out -covermode=atomic -timeout=300s ./...
env:
SHELL: ${{ matrix.shell }}
devel-release:
runs-on: macos-latest
needs: test
steps:
- uses: actions/setup-go@v3
with:
go-version: 1.20.1
- name: Get short SHA
id: version
run: echo "::set-output name=sha8::$(echo ${GITHUB_SHA} | cut -c-8)"
- run: go install github.com/mitchellh/gox@v1.0.2-0.20210311182516-8c3b2b9e647d
- run: echo $(go env GOPATH)/bin >> $GITHUB_PATH
- uses: actions/checkout@v3
- run: make release
env:
RELEASE: ${{ steps.version.outputs.sha8 }}
- uses: actions/upload-artifact@v3
with:
name: puma-dev-${{ steps.version.outputs.sha8 }}-linux-amd64
path: rel/linux_amd64/puma-dev
- uses: actions/upload-artifact@v3
with:
name: puma-dev-${{ steps.version.outputs.sha8 }}-darwin-amd64
path: rel/darwin_amd64/puma-dev
- uses: actions/upload-artifact@v3
with:
name: puma-dev-${{ steps.version.outputs.sha8 }}-darwin-arm64
path: rel/darwin_arm64/puma-dev