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
# SPDX-License-Identifier: Unlicense OR MIT
image: debian/testing
packages:
- curl
- pkg-config
- libwayland-dev
- libx11-dev
- libx11-xcb-dev
- libxkbcommon-dev
- libxkbcommon-x11-dev
- libgles2-mesa-dev
- libegl1-mesa-dev
- libffi-dev
- libxcursor-dev
- libxrandr-dev
- libxinerama-dev
- libxi-dev
- libxxf86vm-dev
sources:
- https://git.sr.ht/~eliasnaur/gio-example
environment:
PATH: /home/build/sdk/go/bin:/usr/bin:/home/build/go/bin
github_mirror: git@github.com:gioui/gio-example
secrets:
- c9ef426e-0c06-42b1-9ee8-d7b9aad02363
tasks:
- install_go: |
mkdir -p /home/build/sdk
cd /home/build/sdk
curl -Lso go.tar.gz https://golang.org/dl/go1.15.6.linux-amd64.tar.gz
echo "3918e6cc85e7eaaa6f859f1bdbaac772e7a825b0eb423c63d3ae68b21f84b844 go.tar.gz" | sha256sum -c -
tar xzf go.tar.gz
- test_example: |
cd gio-example
go test -race ./...
- check_gofmt: |
cd gio-example
test -z "$(gofmt -s -l .)"
- check_sign_off: |
set +x -e
cd gio-example
for hash in $(git log -n 20 --format="%H"); do
message=$(git log -1 --format=%B $hash)
if [[ ! "$message" =~ "Signed-off-by: " ]]; then
echo "Missing 'Signed-off-by' in commit $hash"
exit 1
fi
done
- mirror: |
# mirror to github
ssh-keyscan github.com > "$HOME"/.ssh/known_hosts && cd gio-example && git push --mirror "$github_mirror" || echo "failed mirroring"