diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml new file mode 100644 index 0000000..7d210f4 --- /dev/null +++ b/.github/workflows/ci.yml @@ -0,0 +1,32 @@ +name: ci +on: + push: + pull_request: + workflow_dispatch: + +jobs: + plugins: + name: plugins / ${{matrix.arch}} + runs-on: windows-latest + strategy: + fail-fast: false + matrix: + arch: + - 64 + - 32 + steps: + - uses: actions/checkout@v4 + - uses: actions/setup-go@v5 + with: + go-version-file: 'go.mod' + - uses: msys2/setup-msys2@v2 + with: + msystem: MINGW${{matrix.arch}} + path-type: inherit + - shell: msys2 {0} + run: go run . ${{matrix.arch}} -a -ldflags '-s -w -extldflags=-static' -trimpath -v -x ./plugins/... + # note: -a is needed to prevent caching issues when switching the C compiler (https://pkg.go.dev/cmd/go#hdr-Build_and_test_caching) + - uses: actions/upload-artifact@v4 + with: + name: plugins${{matrix.arch}} + path: '*.dll' diff --git a/.github/workflows/plugins.yml b/.github/workflows/plugins.yml deleted file mode 100644 index e2c4dca..0000000 --- a/.github/workflows/plugins.yml +++ /dev/null @@ -1,23 +0,0 @@ -name: plugins -on: - push: - pull_request: - workflow_dispatch: - -jobs: - build: - runs-on: windows-latest - steps: - - uses: actions/checkout@v4 - - uses: actions/setup-go@v5 - with: - go-version-file: 'go.mod' - - run: go mod download - - env: { CGO_ENABLED: 1, GOOS: windows, GOARCH: amd64, CC: x86_64-w64-mingw32-gcc, MSYSTEM: MINGW64 } - run: go run . 64 -ldflags '-s -w -extldflags=-static' -trimpath -v -x ./plugins/... - # - env: { CGO_ENABLED: 1, GOOS: windows, GOARCH: 386, CC: x86_64-w64-mingw32-gcc, MSYSTEM: MINGW32 } - # run: go run . 32 -ldflags '-s -w -extldflags=-static' -trimpath -v -x ./plugins/... - - uses: actions/upload-artifact@v4 - with: - name: plugins - path: '*.dll'