]> go.fuhry.dev Git - fsnotify.git/commitdiff
Run cross-compilation builds on every push (#420)
authorNahum Shalman <nahamu@gmail.com>
Wed, 19 Jan 2022 02:29:44 +0000 (21:29 -0500)
committerGitHub <noreply@github.com>
Wed, 19 Jan 2022 02:29:44 +0000 (21:29 -0500)
This would have caught #389 and should
catch build failures for supported targets.

.github/workflows/build.yml [new file with mode: 0644]

diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml
new file mode 100644 (file)
index 0000000..04d6213
--- /dev/null
@@ -0,0 +1,30 @@
+name: build
+on: push
+jobs:
+  cross-compile-supported:
+    strategy:
+      fail-fast: false
+      matrix:
+        goos:
+          - android
+          - darwin
+          - freebsd
+          - ios
+          - linux
+          - windows
+        goarch:
+          - amd64
+          - arm64
+    runs-on: ubuntu-latest
+    steps:
+      - name: setup Go
+        uses: actions/setup-go@v2
+        with:
+          go-version: '1.17'
+
+      - name: checkout
+        uses: actions/checkout@v2
+
+      - name: build-${{ matrix.goos }}-${{ matrix.goarch }}
+        run: |
+          GOOS=${{ matrix.goos }} GOARCH=${{ matrix.goarch }} go build