From 936b3d5de5958d24515dc644f87658cec1eeb014 Mon Sep 17 00:00:00 2001 From: Tim Sarbin Date: Tue, 29 Dec 2020 11:05:52 -0500 Subject: [PATCH 1/9] Switched to self hosted build agent --- .github/workflows/pullRequest.yml | 2 +- .github/workflows/pushToMaster.yml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/pullRequest.yml b/.github/workflows/pullRequest.yml index f208b494..9a9333da 100644 --- a/.github/workflows/pullRequest.yml +++ b/.github/workflows/pullRequest.yml @@ -4,7 +4,7 @@ name: pull_request jobs: build: name: Build - runs-on: ubuntu-latest + runs-on: self-hosted continue-on-error: true steps: - name: Set up Go 1.14 diff --git a/.github/workflows/pushToMaster.yml b/.github/workflows/pushToMaster.yml index 346cc565..dcc6dd9e 100644 --- a/.github/workflows/pushToMaster.yml +++ b/.github/workflows/pushToMaster.yml @@ -7,7 +7,7 @@ name: build jobs: build: name: Build - runs-on: ubuntu-latest + runs-on: self-hosted steps: - name: Set up Go 1.14 uses: actions/setup-go@v2.1.3 From 15729b8691023cb00372c5219813e3d95e4e19a8 Mon Sep 17 00:00:00 2001 From: Tim Sarbin Date: Tue, 29 Dec 2020 15:01:40 -0500 Subject: [PATCH 2/9] Removed PR requirement for action --- .github/workflows/pullRequest.yml | 1 - 1 file changed, 1 deletion(-) diff --git a/.github/workflows/pullRequest.yml b/.github/workflows/pullRequest.yml index 9a9333da..b7bda7e1 100644 --- a/.github/workflows/pullRequest.yml +++ b/.github/workflows/pullRequest.yml @@ -1,6 +1,5 @@ --- name: pull_request -"on": [pull_request] jobs: build: name: Build From 97a2923b25ec2b2d514f5b17f236a2bfe2343f5e Mon Sep 17 00:00:00 2001 From: Tim Sarbin Date: Tue, 29 Dec 2020 15:05:48 -0500 Subject: [PATCH 3/9] remove build job requirement --- .github/workflows/pushToMaster.yml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/.github/workflows/pushToMaster.yml b/.github/workflows/pushToMaster.yml index dcc6dd9e..273ff550 100644 --- a/.github/workflows/pushToMaster.yml +++ b/.github/workflows/pushToMaster.yml @@ -1,9 +1,9 @@ --- name: build -"on": - push: - branches: - - master +# "on": +# push: +# branches: +# - master jobs: build: name: Build From edd0cb0aae80e5f40b9622ea0d1f2cad29c1e517 Mon Sep 17 00:00:00 2001 From: Tim Sarbin Date: Tue, 29 Dec 2020 15:16:18 -0500 Subject: [PATCH 4/9] Fiddling with actions names --- .github/workflows/pullRequest.yml | 3 ++- .github/workflows/pushToMaster.yml | 10 +++++----- 2 files changed, 7 insertions(+), 6 deletions(-) diff --git a/.github/workflows/pullRequest.yml b/.github/workflows/pullRequest.yml index b7bda7e1..ffcec707 100644 --- a/.github/workflows/pullRequest.yml +++ b/.github/workflows/pullRequest.yml @@ -1,8 +1,9 @@ --- name: pull_request +"on": [pull_request] jobs: build: - name: Build + name: 'Pull Request' runs-on: self-hosted continue-on-error: true steps: diff --git a/.github/workflows/pushToMaster.yml b/.github/workflows/pushToMaster.yml index 273ff550..8687e9e4 100644 --- a/.github/workflows/pushToMaster.yml +++ b/.github/workflows/pushToMaster.yml @@ -1,12 +1,12 @@ --- name: build -# "on": -# push: -# branches: -# - master +"on": + push: + branches: + - master jobs: build: - name: Build + name: 'Push to Master' runs-on: self-hosted steps: - name: Set up Go 1.14 From b18936eed0f1215f4dad5b1ff798fc2d4a366680 Mon Sep 17 00:00:00 2001 From: Tim Sarbin Date: Tue, 29 Dec 2020 15:20:24 -0500 Subject: [PATCH 5/9] Updated workflows --- .github/workflows/pullRequest.yml | 11 +++++++-- .github/workflows/pushToMaster.yml | 39 ------------------------------ 2 files changed, 9 insertions(+), 41 deletions(-) delete mode 100644 .github/workflows/pushToMaster.yml diff --git a/.github/workflows/pullRequest.yml b/.github/workflows/pullRequest.yml index ffcec707..7089c18c 100644 --- a/.github/workflows/pullRequest.yml +++ b/.github/workflows/pullRequest.yml @@ -1,9 +1,16 @@ --- name: pull_request -"on": [pull_request] +on: + push: + branches: + - main + pull_request: + branches: + - main + jobs: build: - name: 'Pull Request' + name: build runs-on: self-hosted continue-on-error: true steps: diff --git a/.github/workflows/pushToMaster.yml b/.github/workflows/pushToMaster.yml deleted file mode 100644 index 8687e9e4..00000000 --- a/.github/workflows/pushToMaster.yml +++ /dev/null @@ -1,39 +0,0 @@ ---- -name: build -"on": - push: - branches: - - master -jobs: - build: - name: 'Push to Master' - runs-on: self-hosted - steps: - - name: Set up Go 1.14 - uses: actions/setup-go@v2.1.3 - with: - go-version: 1.14 - id: go - - - name: Check out code - uses: actions/checkout@v2.3.4 - - - name: Install dependencies - run: | - sudo apt-get update - sudo apt-get install -y xvfb libxcursor-dev libxrandr-dev libxinerama-dev libxi-dev libgl1-mesa-dev libsdl2-dev libasound2-dev > /dev/null 2>&1 - - - name: Run golangci-lint - continue-on-error: false - uses: golangci/golangci-lint-action@v2.3.0 - with: - version: v1.32 - - - name: Run tests - env: - DISPLAY: ":99.0" - run: | - xvfb-run --auto-servernum go test -v -race ./... - - - name: Build binary - run: go build . From 23f05752b321de7671c2eda52389f173bdac39ed Mon Sep 17 00:00:00 2001 From: Tim Sarbin Date: Tue, 29 Dec 2020 15:24:17 -0500 Subject: [PATCH 6/9] Fix yaml errors --- .github/workflows/pullRequest.yml | 15 +++++++-------- 1 file changed, 7 insertions(+), 8 deletions(-) diff --git a/.github/workflows/pullRequest.yml b/.github/workflows/pullRequest.yml index 7089c18c..c0526e99 100644 --- a/.github/workflows/pullRequest.yml +++ b/.github/workflows/pullRequest.yml @@ -1,16 +1,15 @@ ---- name: pull_request on: - push: - branches: - - main - pull_request: - branches: - - main + push: + branches: + - main + pull_request: + branches: + - main jobs: build: - name: build + name: '' runs-on: self-hosted continue-on-error: true steps: From d18243102b902d3a12edf8658344a35b65321699 Mon Sep 17 00:00:00 2001 From: Tim Sarbin Date: Tue, 29 Dec 2020 15:29:15 -0500 Subject: [PATCH 7/9] Yet another yaml fix --- .github/workflows/pullRequest.yml | 9 +-------- 1 file changed, 1 insertion(+), 8 deletions(-) diff --git a/.github/workflows/pullRequest.yml b/.github/workflows/pullRequest.yml index c0526e99..471307b2 100644 --- a/.github/workflows/pullRequest.yml +++ b/.github/workflows/pullRequest.yml @@ -1,12 +1,5 @@ name: pull_request -on: - push: - branches: - - main - pull_request: - branches: - - main - +"on": [pull_request] jobs: build: name: '' From 92989d6d7a65ef8ee71a3a9c68e1e082c585f0f8 Mon Sep 17 00:00:00 2001 From: Tim Sarbin Date: Wed, 30 Dec 2020 02:08:32 -0500 Subject: [PATCH 8/9] Removed improper ebiten dependency in d2interface. --- d2common/d2interface/renderer.go | 6 ++---- d2common/d2util/debug_print.go | 8 ++++---- 2 files changed, 6 insertions(+), 8 deletions(-) diff --git a/d2common/d2interface/renderer.go b/d2common/d2interface/renderer.go index 1843bf0a..a2313ee3 100644 --- a/d2common/d2interface/renderer.go +++ b/d2common/d2interface/renderer.go @@ -1,7 +1,5 @@ package d2interface -import "github.com/hajimehoshi/ebiten/v2" - type renderCallback = func(Surface) error type updateCallback = func() error @@ -21,6 +19,6 @@ type Renderer interface { GetCursorPos() (int, int) CurrentFPS() float64 ShowPanicScreen(message string) - Print(target *ebiten.Image, str string) error - PrintAt(target *ebiten.Image, str string, x, y int) + Print(target interface{}, str string) error + PrintAt(target interface{}, str string, x, y int) } diff --git a/d2common/d2util/debug_print.go b/d2common/d2util/debug_print.go index daa20386..489f28ae 100644 --- a/d2common/d2util/debug_print.go +++ b/d2common/d2util/debug_print.go @@ -37,16 +37,16 @@ type GlyphPrinter struct { // Basic Latin and C1 Controls and Latin-1 Supplement. // // DebugPrint always returns nil as of 1.5.0-alpha. -func (p *GlyphPrinter) Print(target *ebiten.Image, str string) error { - p.PrintAt(target, str, 0, 0) +func (p *GlyphPrinter) Print(target interface{}, str string) error { + p.PrintAt(target.(*ebiten.Image), str, 0, 0) return nil } // PrintAt draws the string str on the image at (x, y) position. // The available runes are in U+0000 to U+00FF, which is C0 Controls and // Basic Latin and C1 Controls and Latin-1 Supplement. -func (p *GlyphPrinter) PrintAt(target *ebiten.Image, str string, x, y int) { - p.drawDebugText(target, str, x, y, false) +func (p *GlyphPrinter) PrintAt(target interface{}, str string, x, y int) { + p.drawDebugText(target.(*ebiten.Image), str, x, y, false) } func (p *GlyphPrinter) drawDebugText(target *ebiten.Image, str string, ox, oy int, shadow bool) { From db87175872c6980e5eb6f7586530b31e3eb6e8ca Mon Sep 17 00:00:00 2001 From: ThomasChr Date: Fri, 1 Jan 2021 20:49:49 +0100 Subject: [PATCH 9/9] Render HUD before Panels (in this Case 'Panels' only does mean Inventory Panel). This is to avoid Entity Labels to be renderd above the Inventory Panel. Fixes #936 --- d2game/d2player/game_controls.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/d2game/d2player/game_controls.go b/d2game/d2player/game_controls.go index 9b278869..196964fe 100644 --- a/d2game/d2player/game_controls.go +++ b/d2game/d2player/game_controls.go @@ -795,11 +795,11 @@ func (g *GameControls) isInActiveMenusRect(px, py int) bool { // Render draws the GameControls onto the target func (g *GameControls) Render(target d2interface.Surface) error { - if err := g.renderPanels(target); err != nil { + if err := g.hud.Render(target); err != nil { return err } - if err := g.hud.Render(target); err != nil { + if err := g.renderPanels(target); err != nil { return err }