mirror of
https://git.sr.ht/~eliasnaur/gio
synced 2026-07-01 07:35:40 +00:00
ec34eb4919
It's essentially a copy of go.mod, but with the gioui.org module replaed with the parent directory. Useful when wanting to try a change in the root module as part of a gogio invocation or end-to-end test, such as either of the following: $ cd cmd; go test -modfile=go.local.mod ./... $ cd cmd/gogio; go build -modfile=../go.local.mod Since go.sum can essentially be shared, and since it seems to work with the go tool, use a symlink. The way the -modfile flag works, if given foo.mod, it will use the sum file at foo.sum. The only caveat is that 'go mod tidy -modfile=go.mod.local' will try to remove gioui.org lines, since that module is replaced. So tidy shouldn't be used with -modfile. In the future, the only upkeep needed for go.local.mod is to update the external dependencies to mirror changes in go.mod. This is not automated nor checked by CI, but it could be in the future if it becomes repetitive or error-prone. Signed-off-by: Daniel Martí <mvdan@mvdan.cc>
61 lines
1.5 KiB
YAML
61 lines
1.5 KiB
YAML
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
|
|
- libxcursor-dev
|
|
- libxrandr-dev
|
|
- libxinerama-dev
|
|
- libxi-dev
|
|
- libxxf86vm-dev
|
|
- wine
|
|
- xvfb
|
|
- xdotool
|
|
- scrot
|
|
- sway
|
|
- grim
|
|
- wine
|
|
sources:
|
|
- https://git.sr.ht/~eliasnaur/gio
|
|
secrets:
|
|
- 0dd5efdf-400e-4735-8320-98b44844dfd0
|
|
environment:
|
|
GOFLAGS: -mod=readonly
|
|
PATH: /home/build/sdk/go/bin:/usr/bin
|
|
tasks:
|
|
- install_go1_14: |
|
|
mkdir -p /home/build/sdk
|
|
curl https://dl.google.com/go/go1.14.linux-amd64.tar.gz | tar -C /home/build/sdk -xzf -
|
|
- install_chrome: |
|
|
curl -s https://dl.google.com/linux/linux_signing_key.pub | sudo apt-key add -
|
|
sudo sh -c 'echo "deb [arch=amd64] http://dl.google.com/linux/chrome/deb/ stable main" >> /etc/apt/sources.list.d/google.list'
|
|
sudo apt update
|
|
sudo apt install -y google-chrome-stable
|
|
- test_gio: |
|
|
cd gio
|
|
go test -race ./...
|
|
GOOS=windows go test -exec=wine ./...
|
|
GOOS=js GOARCH=wasm go build -o /dev/null ./...
|
|
- test_cmd: |
|
|
cd gio/cmd
|
|
go test ./...
|
|
go test -race ./...
|
|
go test -modfile=go.local.mod ./...
|
|
- test_example: |
|
|
cd gio/example
|
|
go test -race ./...
|
|
- check_gofmt: |
|
|
cd gio
|
|
test -z "$(gofmt -s -l .)"
|
|
- annotate: |
|
|
go get git.sr.ht/~sircmpwn/annotatego
|
|
cd gio
|
|
~/go/bin/annotatego -v -T gioui.org... > annotations.json
|
|
../upload-annotations annotations.json eliasnaur gio
|