Compare commits

...
Sign in to create a new pull request.

4 commits

Author SHA1 Message Date
Nick Craig-Wood
69fdcd4300 build: disable cmount tests under macOS and the CI since they are locking up
This fixes #5951 and allows the macOS builds to run again

See #5960 for more info.
2022-01-27 16:54:52 +00:00
Nick Craig-Wood
c0331c0c83 build: don't specify macos SDK any more as default is good enough #5951
This fixes the build, in particular the error:

    Failed to run ["xcrun" "--sdk" "macosx11.1" "--show-sdk-path"]: exit status 1
2022-01-27 09:42:04 +00:00
Nick Craig-Wood
533377a955 build: upgrade to macos-11 to attempt to fix macOS build problems #5951 2022-01-26 17:49:21 +00:00
Nick Craig-Wood
f6f7bb35d5 build: cut down builds to macOS only FIXME DO NOT MERGE 2022-01-26 17:49:21 +00:00
4 changed files with 66 additions and 50 deletions

View file

@ -25,22 +25,22 @@ jobs:
strategy:
fail-fast: false
matrix:
job_name: ['linux', 'mac_amd64', 'mac_arm64', 'windows_amd64', 'windows_386', 'other_os', 'go1.15', 'go1.16']
job_name: ['mac_amd64', 'mac_arm64']
include:
- job_name: linux
os: ubuntu-latest
go: '1.17.x'
gotags: cmount
build_flags: '-include "^linux/"'
check: true
quicktest: true
racequicktest: true
librclonetest: true
deploy: true
# - job_name: linux
# os: ubuntu-latest
# go: '1.17.x'
# gotags: cmount
# build_flags: '-include "^linux/"'
# check: true
# quicktest: true
# racequicktest: true
# librclonetest: true
# deploy: true
- job_name: mac_amd64
os: macOS-latest
os: macos-11
go: '1.17.x'
gotags: 'cmount'
build_flags: '-include "^darwin/amd64" -cgo'
@ -49,51 +49,51 @@ jobs:
deploy: true
- job_name: mac_arm64
os: macOS-latest
os: macos-11
go: '1.17.x'
gotags: 'cmount'
build_flags: '-include "^darwin/arm64" -cgo -macos-arch arm64 -macos-sdk macosx11.1 -cgo-cflags=-I/usr/local/include -cgo-ldflags=-L/usr/local/lib'
build_flags: '-include "^darwin/arm64" -cgo -macos-arch arm64 -cgo-cflags=-I/usr/local/include -cgo-ldflags=-L/usr/local/lib'
deploy: true
- job_name: windows_amd64
os: windows-latest
go: '1.17.x'
gotags: cmount
build_flags: '-include "^windows/amd64" -cgo'
build_args: '-buildmode exe'
quicktest: true
racequicktest: true
deploy: true
# - job_name: windows_amd64
# os: windows-latest
# go: '1.17.x'
# gotags: cmount
# build_flags: '-include "^windows/amd64" -cgo'
# build_args: '-buildmode exe'
# quicktest: true
# racequicktest: true
# deploy: true
- job_name: windows_386
os: windows-latest
go: '1.17.x'
gotags: cmount
goarch: '386'
cgo: '1'
build_flags: '-include "^windows/386" -cgo'
build_args: '-buildmode exe'
quicktest: true
deploy: true
# - job_name: windows_386
# os: windows-latest
# go: '1.17.x'
# gotags: cmount
# goarch: '386'
# cgo: '1'
# build_flags: '-include "^windows/386" -cgo'
# build_args: '-buildmode exe'
# quicktest: true
# deploy: true
- job_name: other_os
os: ubuntu-latest
go: '1.17.x'
build_flags: '-exclude "^(windows/|darwin/|linux/)"'
compile_all: true
deploy: true
# - job_name: other_os
# os: ubuntu-latest
# go: '1.17.x'
# build_flags: '-exclude "^(windows/|darwin/|linux/)"'
# compile_all: true
# deploy: true
- job_name: go1.15
os: ubuntu-latest
go: '1.15.x'
quicktest: true
racequicktest: true
# - job_name: go1.15
# os: ubuntu-latest
# go: '1.15.x'
# quicktest: true
# racequicktest: true
- job_name: go1.16
os: ubuntu-latest
go: '1.16.x'
quicktest: true
racequicktest: true
# - job_name: go1.16
# os: ubuntu-latest
# go: '1.16.x'
# quicktest: true
# racequicktest: true
name: ${{ matrix.job_name }}
@ -134,7 +134,7 @@ jobs:
run: |
brew update
brew install --cask macfuse
if: matrix.os == 'macOS-latest'
if: matrix.os == 'macos-11'
- name: Install Libraries on Windows
shell: powershell

View file

@ -10,11 +10,17 @@
package cmount
import (
"runtime"
"testing"
"github.com/rclone/rclone/fstest/testy"
"github.com/rclone/rclone/vfs/vfstest"
)
func TestMount(t *testing.T) {
// Disable tests under macOS and the CI since they are locking up
if runtime.GOOS == "darwin" {
testy.SkipUnreliable(t)
}
vfstest.RunTests(t, false, mount)
}

View file

@ -16,11 +16,16 @@ import (
"github.com/rclone/rclone/cmd/mountlib"
"github.com/rclone/rclone/fs/config/configfile"
"github.com/rclone/rclone/fs/rc"
"github.com/rclone/rclone/fstest/testy"
"github.com/stretchr/testify/assert"
"github.com/stretchr/testify/require"
)
func TestRc(t *testing.T) {
// Disable tests under macOS and the CI since they are locking up
if runtime.GOOS == "darwin" {
testy.SkipUnreliable(t)
}
ctx := context.Background()
configfile.Install()
mount := rc.Calls.Get("mount/mount")

View file

@ -23,6 +23,7 @@ import (
"github.com/rclone/rclone/fs"
"github.com/rclone/rclone/fs/config"
"github.com/rclone/rclone/fstest"
"github.com/rclone/rclone/fstest/testy"
"github.com/rclone/rclone/lib/file"
"github.com/stretchr/testify/assert"
@ -303,6 +304,10 @@ func (a *APIClient) request(path string, in, out interface{}, wantErr bool) {
}
func testMountAPI(t *testing.T, sockAddr string) {
// Disable tests under macOS and the CI since they are locking up
if runtime.GOOS == "darwin" {
testy.SkipUnreliable(t)
}
if _, mountFn := mountlib.ResolveMountMethod(""); mountFn == nil {
t.Skip("Test requires working mount command")
}