From 62127e432e026292653c294a17a39e4a31999d4e Mon Sep 17 00:00:00 2001 From: Hajime Hoshi Date: Mon, 5 Sep 2022 13:19:26 +0900 Subject: [PATCH] bug fix: `go mod vendor` didn't work Closes #2036 Closes ebitengine/purego#31 --- .github/workflows/test.yml | 17 +++++++++++++++++ go.mod | 2 +- go.sum | 4 ++-- 3 files changed, 20 insertions(+), 3 deletions(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 31f930da3..8e08085ae 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -111,6 +111,23 @@ jobs: go build -tags=example,nintendosdk -v ./... go build -tags=example,ebitencbackend -v ./... # For backward compatibility. Remove this in the future (#2190). + - name: go mod vendor + run: | + mkdir /tmp/vendoring + cd /tmp/vendoring + go mod init foo + # TODO: Is there a way to create a complete list of Ebitengine sub-packages? + echo 'package main' > main.go + echo 'import (' >> main.go + echo ' _ "github.com/hajimehoshi/ebiten/v2"' >> main.go + echo ' _ "github.com/hajimehoshi/ebiten/v2/audio"' >> main.go + echo ')' >> main.go + echo 'func main() {}' >> main.go + go mod edit -replace github.com/hajimehoshi/ebiten/v2=$GITHUB_WORKSPACE + go mod tidy + go mod vendor + go build -v . + - name: go test # TODO: Add more test environments (#1305) if: ${{ startsWith(matrix.os, 'ubuntu-') || startsWith(matrix.os, 'windows-') }} diff --git a/go.mod b/go.mod index b8e42dd09..5d8b9a08a 100644 --- a/go.mod +++ b/go.mod @@ -3,7 +3,7 @@ module github.com/hajimehoshi/ebiten/v2 go 1.15 require ( - github.com/ebitengine/purego v0.0.0-20220820193322-ffec45151ddb + github.com/ebitengine/purego v0.0.0-20220905075623-aeed57cda744 github.com/go-gl/glfw/v3.3/glfw v0.0.0-20220806181222-55e207c401ad github.com/hajimehoshi/bitmapfont/v2 v2.2.1 github.com/hajimehoshi/go-mp3 v0.3.3 diff --git a/go.sum b/go.sum index 7cb62df1f..5674f0f21 100644 --- a/go.sum +++ b/go.sum @@ -1,6 +1,6 @@ github.com/BurntSushi/xgb v0.0.0-20160522181843-27f122750802/go.mod h1:IVnqGOEym/WlBOVXweHU+Q+/VP0lqqI8lqeDx9IjBqo= -github.com/ebitengine/purego v0.0.0-20220820193322-ffec45151ddb h1:zlTWAVpG0AJp22YuKYMTf3lvOEQvtlXPm2CJ/1FZcR4= -github.com/ebitengine/purego v0.0.0-20220820193322-ffec45151ddb/go.mod h1:Eh8I3yvknDYZeCuXH9kRNaPuHEwvXDCk378o9xszmHg= +github.com/ebitengine/purego v0.0.0-20220905075623-aeed57cda744 h1:A8UnJ/5OKzki4HBDwoRQz7I6sxKsokpMXcGh+fUxpfc= +github.com/ebitengine/purego v0.0.0-20220905075623-aeed57cda744/go.mod h1:Eh8I3yvknDYZeCuXH9kRNaPuHEwvXDCk378o9xszmHg= github.com/go-gl/glfw/v3.3/glfw v0.0.0-20220806181222-55e207c401ad h1:kX51IjbsJPCvzV9jUoVQG9GEUqIq5hjfYzXTqQ52Rh8= github.com/go-gl/glfw/v3.3/glfw v0.0.0-20220806181222-55e207c401ad/go.mod h1:tQ2UAYgL5IevRw8kRxooKSPJfGvJ9fJQFa0TUsXzTg8= github.com/hajimehoshi/bitmapfont/v2 v2.2.1 h1:y7zcy02/UgO24IL3COqYtrRZzhRucNBtmCo/SNU648k=