From 74432139f07aac0645d6a1d17b04db4c8bc3b534 Mon Sep 17 00:00:00 2001 From: Tobias Klauser Date: Thu, 25 Apr 2024 10:01:27 +0200 Subject: [PATCH 1/2] cgotest: fix test build on unsupported platforms --- cgotest/sysconf_cgotest_other.go | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) create mode 100644 cgotest/sysconf_cgotest_other.go diff --git a/cgotest/sysconf_cgotest_other.go b/cgotest/sysconf_cgotest_other.go new file mode 100644 index 0000000..98e2905 --- /dev/null +++ b/cgotest/sysconf_cgotest_other.go @@ -0,0 +1,16 @@ +// Copyright 2024 Tobias Klauser. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +//go:build !darwin && !dragonfly && !freebsd && !linux && !netbsd && !openbsd && !solaris + +package sysconf_cgotest + +import ( + "runtime" + "testing" +) + +func testSysconfCgoMatch(t *testing.T) { + t.Skipf("skipping cgotest on unsupported platform %s", runtime.GOOS) +} From ef1669d1b8967fe083147c9c3d7545a38ed31abf Mon Sep 17 00:00:00 2001 From: Tobias Klauser Date: Thu, 25 Apr 2024 10:01:51 +0200 Subject: [PATCH 2/2] .github/workflows: test on windows This covers unsupported platforms on which tests should still pass. --- .github/workflows/test.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 17ecd3b..e221643 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -14,7 +14,7 @@ jobs: matrix: # Oldest supported version is 1.18, plus the latest two releases. go-version: ['1.18', '1.21', '1.22'] - os: [ubuntu-20.04, ubuntu-22.04, macos-11, macos-12, macos-13, macos-14] + os: [ubuntu-20.04, ubuntu-22.04, macos-11, macos-12, macos-13, macos-14, windows-2019, windows-2022] runs-on: ${{ matrix.os }} steps: