Skip to content

Commit aa102aa

Browse files
committed
Merge remote-tracking branch 'upstream/master'
2 parents 54347ee + df513ca commit aa102aa

File tree

1,250 files changed

+195540
-100222
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

1,250 files changed

+195540
-100222
lines changed

.github/ISSUE_TEMPLATE/Bug.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ We understand you are having a problem with rclone; we want to help you with tha
99
1010
**STOP and READ**
1111
**YOUR POST WILL BE REMOVED IF IT IS LOW QUALITY**:
12-
Please show the effort you've put in to solving the problem and please be specific.
12+
Please show the effort you've put into solving the problem and please be specific.
1313
People are volunteering their time to help! Low effort posts are not likely to get good answers!
1414
1515
If you think you might have found a bug, try to replicate it with the latest beta (or stable).

.github/PULL_REQUEST_TEMPLATE.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ Link issues and relevant forum posts here.
2222

2323
#### Checklist
2424

25-
- [ ] I have read the [contribution guidelines](https://github.com/rclone/rclone/blob/master/CONTRIBUTING.md#submitting-a-pull-request).
25+
- [ ] I have read the [contribution guidelines](https://github.com/rclone/rclone/blob/master/CONTRIBUTING.md#submitting-a-new-feature-or-bug-fix).
2626
- [ ] I have added tests for all changes in this PR if appropriate.
2727
- [ ] I have added documentation for the changes if appropriate.
2828
- [ ] All commit messages are in [house style](https://github.com/rclone/rclone/blob/master/CONTRIBUTING.md#commit-messages).

.github/workflows/build.yml

Lines changed: 150 additions & 146 deletions
Original file line numberDiff line numberDiff line change
@@ -25,12 +25,12 @@ jobs:
2525
strategy:
2626
fail-fast: false
2727
matrix:
28-
job_name: ['linux', 'mac_amd64', 'mac_arm64', 'windows_amd64', 'windows_386', 'other_os', 'go1.13', 'go1.14', 'go1.15']
28+
job_name: ['linux', 'linux_386', 'mac_amd64', 'mac_arm64', 'windows', 'other_os', 'go1.17', 'go1.18']
2929

3030
include:
3131
- job_name: linux
3232
os: ubuntu-latest
33-
go: '1.16.x'
33+
go: '1.19.x'
3434
gotags: cmount
3535
build_flags: '-include "^linux/"'
3636
check: true
@@ -39,64 +39,55 @@ jobs:
3939
librclonetest: true
4040
deploy: true
4141

42+
- job_name: linux_386
43+
os: ubuntu-latest
44+
go: '1.19.x'
45+
goarch: 386
46+
gotags: cmount
47+
quicktest: true
48+
4249
- job_name: mac_amd64
43-
os: macOS-latest
44-
go: '1.16.x'
50+
os: macos-11
51+
go: '1.19.x'
4552
gotags: 'cmount'
4653
build_flags: '-include "^darwin/amd64" -cgo'
4754
quicktest: true
4855
racequicktest: true
4956
deploy: true
5057

5158
- job_name: mac_arm64
52-
os: macOS-latest
53-
go: '1.16.x'
59+
os: macos-11
60+
go: '1.19.x'
5461
gotags: 'cmount'
55-
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'
62+
build_flags: '-include "^darwin/arm64" -cgo -macos-arch arm64 -cgo-cflags=-I/usr/local/include -cgo-ldflags=-L/usr/local/lib'
5663
deploy: true
5764

58-
- job_name: windows_amd64
65+
- job_name: windows
5966
os: windows-latest
60-
go: '1.16.x'
67+
go: '1.19.x'
6168
gotags: cmount
62-
build_flags: '-include "^windows/amd64" -cgo'
63-
build_args: '-buildmode exe'
64-
quicktest: true
65-
racequicktest: true
66-
deploy: true
67-
68-
- job_name: windows_386
69-
os: windows-latest
70-
go: '1.16.x'
71-
gotags: cmount
72-
goarch: '386'
73-
cgo: '1'
74-
build_flags: '-include "^windows/386" -cgo'
69+
cgo: '0'
70+
build_flags: '-include "^windows/"'
7571
build_args: '-buildmode exe'
7672
quicktest: true
7773
deploy: true
7874

7975
- job_name: other_os
8076
os: ubuntu-latest
81-
go: '1.16.x'
77+
go: '1.19.x'
8278
build_flags: '-exclude "^(windows/|darwin/|linux/)"'
8379
compile_all: true
8480
deploy: true
8581

86-
- job_name: go1.13
82+
- job_name: go1.17
8783
os: ubuntu-latest
88-
go: '1.13.x'
89-
quicktest: true
90-
91-
- job_name: go1.14
92-
os: ubuntu-latest
93-
go: '1.14.x'
84+
go: '1.17.x'
9485
quicktest: true
9586
racequicktest: true
9687

97-
- job_name: go1.15
88+
- job_name: go1.18
9889
os: ubuntu-latest
99-
go: '1.15.x'
90+
go: '1.18.x'
10091
quicktest: true
10192
racequicktest: true
10293

@@ -115,6 +106,7 @@ jobs:
115106
with:
116107
stable: 'false'
117108
go-version: ${{ matrix.go }}
109+
check-latest: true
118110

119111
- name: Set environment variables
120112
shell: bash
@@ -139,7 +131,7 @@ jobs:
139131
run: |
140132
brew update
141133
brew install --cask macfuse
142-
if: matrix.os == 'macOS-latest'
134+
if: matrix.os == 'macos-11'
143135

144136
- name: Install Libraries on Windows
145137
shell: powershell
@@ -182,6 +174,11 @@ jobs:
182174
run: |
183175
make
184176
177+
- name: Rclone version
178+
shell: bash
179+
run: |
180+
rclone version
181+
185182
- name: Run tests
186183
shell: bash
187184
run: |
@@ -202,13 +199,6 @@ jobs:
202199
librclone/python/test_rclone.py
203200
if: matrix.librclonetest
204201

205-
- name: Code quality test
206-
shell: bash
207-
run: |
208-
make build_dep
209-
make check
210-
if: matrix.check
211-
212202
- name: Compile all architectures test
213203
shell: bash
214204
run: |
@@ -228,110 +218,124 @@ jobs:
228218
# Deploy binaries if enabled in config && not a PR && not a fork
229219
if: matrix.deploy && github.head_ref == '' && github.repository == 'rclone/rclone'
230220

221+
lint:
222+
if: ${{ github.repository == 'rclone/rclone' || github.event.inputs.manual }}
223+
timeout-minutes: 30
224+
name: "lint"
225+
runs-on: ubuntu-latest
226+
227+
steps:
228+
- name: Checkout
229+
uses: actions/checkout@v2
230+
231+
- name: Code quality test
232+
uses: golangci/golangci-lint-action@v3
233+
with:
234+
# Optional: version of golangci-lint to use in form of v1.2 or v1.2.3 or `latest` to use the latest version
235+
version: latest
236+
231237
android:
232-
if: ${{ github.repository == 'rclone/rclone' || github.event.inputs.manual }}
233-
timeout-minutes: 30
234-
name: "android-all"
235-
runs-on: ubuntu-latest
236-
237-
steps:
238-
- name: Checkout
239-
uses: actions/checkout@v2
240-
with:
241-
fetch-depth: 0
242-
243-
# Upgrade together with NDK version
244-
- name: Set up Go 1.14
245-
uses: actions/setup-go@v1
246-
with:
247-
go-version: 1.14
248-
249-
# Upgrade together with Go version. Using a GitHub-provided version saves around 2 minutes.
250-
- name: Force NDK version
251-
run: echo "y" | sudo ${ANDROID_HOME}/tools/bin/sdkmanager --install "ndk;21.4.7075529" | grep -v = || true
252-
253-
- name: Go module cache
254-
uses: actions/cache@v2
255-
with:
256-
path: ~/go/pkg/mod
257-
key: ${{ runner.os }}-go-${{ hashFiles('**/go.sum') }}
258-
restore-keys: |
259-
${{ runner.os }}-go-
260-
261-
- name: Set global environment variables
262-
shell: bash
263-
run: |
264-
echo "VERSION=$(make version)" >> $GITHUB_ENV
265-
266-
- name: build native rclone
267-
run: |
268-
make
269-
270-
- name: install gomobile
271-
run: |
272-
go get golang.org/x/mobile/cmd/gobind
273-
go get golang.org/x/mobile/cmd/gomobile
274-
env PATH=$PATH:~/go/bin gomobile init
275-
276-
- name: arm-v7a gomobile build
277-
run: env PATH=$PATH:~/go/bin gomobile bind -v -target=android/arm -javapkg=org.rclone -ldflags '-s -X github.com/rclone/rclone/fs.Version='${VERSION} github.com/rclone/rclone/librclone/gomobile
278-
279-
- name: arm-v7a Set environment variables
280-
shell: bash
281-
run: |
282-
echo "CC=$(echo $ANDROID_HOME/ndk/21.4.7075529/toolchains/llvm/prebuilt/linux-x86_64/bin/armv7a-linux-androideabi16-clang)" >> $GITHUB_ENV
283-
echo "CC_FOR_TARGET=$CC" >> $GITHUB_ENV
284-
echo 'GOOS=android' >> $GITHUB_ENV
285-
echo 'GOARCH=arm' >> $GITHUB_ENV
286-
echo 'GOARM=7' >> $GITHUB_ENV
287-
echo 'CGO_ENABLED=1' >> $GITHUB_ENV
288-
echo 'CGO_LDFLAGS=-fuse-ld=lld -s -w' >> $GITHUB_ENV
289-
- name: arm-v7a build
290-
run: go build -v -tags android -trimpath -ldflags '-s -X github.com/rclone/rclone/fs.Version='${VERSION} -o build/rclone-android-16-armv7a .
291-
292-
- name: arm64-v8a Set environment variables
293-
shell: bash
294-
run: |
295-
echo "CC=$(echo $ANDROID_HOME/ndk/21.4.7075529/toolchains/llvm/prebuilt/linux-x86_64/bin/aarch64-linux-android21-clang)" >> $GITHUB_ENV
296-
echo "CC_FOR_TARGET=$CC" >> $GITHUB_ENV
297-
echo 'GOOS=android' >> $GITHUB_ENV
298-
echo 'GOARCH=arm64' >> $GITHUB_ENV
299-
echo 'CGO_ENABLED=1' >> $GITHUB_ENV
300-
echo 'CGO_LDFLAGS=-fuse-ld=lld -s -w' >> $GITHUB_ENV
301-
302-
- name: arm64-v8a build
303-
run: go build -v -tags android -trimpath -ldflags '-s -X github.com/rclone/rclone/fs.Version='${VERSION} -o build/rclone-android-21-armv8a .
304-
305-
- name: x86 Set environment variables
306-
shell: bash
307-
run: |
308-
echo "CC=$(echo $ANDROID_HOME/ndk/21.4.7075529/toolchains/llvm/prebuilt/linux-x86_64/bin/i686-linux-android16-clang)" >> $GITHUB_ENV
309-
echo "CC_FOR_TARGET=$CC" >> $GITHUB_ENV
310-
echo 'GOOS=android' >> $GITHUB_ENV
311-
echo 'GOARCH=386' >> $GITHUB_ENV
312-
echo 'CGO_ENABLED=1' >> $GITHUB_ENV
313-
echo 'CGO_LDFLAGS=-fuse-ld=lld -s -w' >> $GITHUB_ENV
314-
315-
- name: x86 build
316-
run: go build -v -tags android -trimpath -ldflags '-s -X github.com/rclone/rclone/fs.Version='${VERSION} -o build/rclone-android-16-x86 .
317-
318-
- name: x64 Set environment variables
319-
shell: bash
320-
run: |
321-
echo "CC=$(echo $ANDROID_HOME/ndk/21.4.7075529/toolchains/llvm/prebuilt/linux-x86_64/bin/x86_64-linux-android21-clang)" >> $GITHUB_ENV
322-
echo "CC_FOR_TARGET=$CC" >> $GITHUB_ENV
323-
echo 'GOOS=android' >> $GITHUB_ENV
324-
echo 'GOARCH=amd64' >> $GITHUB_ENV
325-
echo 'CGO_ENABLED=1' >> $GITHUB_ENV
326-
echo 'CGO_LDFLAGS=-fuse-ld=lld -s -w' >> $GITHUB_ENV
327-
328-
- name: x64 build
329-
run: go build -v -tags android -trimpath -ldflags '-s -X github.com/rclone/rclone/fs.Version='${VERSION} -o build/rclone-android-21-x64 .
330-
331-
- name: Upload artifacts
332-
run: |
333-
make ci_upload
334-
env:
335-
RCLONE_CONFIG_PASS: ${{ secrets.RCLONE_CONFIG_PASS }}
336-
# Upload artifacts if not a PR && not a fork
337-
if: github.head_ref == '' && github.repository == 'rclone/rclone'
238+
if: ${{ github.repository == 'rclone/rclone' || github.event.inputs.manual }}
239+
timeout-minutes: 30
240+
name: "android-all"
241+
runs-on: ubuntu-latest
242+
243+
steps:
244+
- name: Checkout
245+
uses: actions/checkout@v2
246+
with:
247+
fetch-depth: 0
248+
249+
# Upgrade together with NDK version
250+
- name: Set up Go
251+
uses: actions/setup-go@v1
252+
with:
253+
go-version: 1.19.x
254+
255+
- name: Go module cache
256+
uses: actions/cache@v2
257+
with:
258+
path: ~/go/pkg/mod
259+
key: ${{ runner.os }}-go-${{ hashFiles('**/go.sum') }}
260+
restore-keys: |
261+
${{ runner.os }}-go-
262+
263+
- name: Set global environment variables
264+
shell: bash
265+
run: |
266+
echo "VERSION=$(make version)" >> $GITHUB_ENV
267+
268+
- name: build native rclone
269+
run: |
270+
make
271+
272+
- name: install gomobile
273+
run: |
274+
go install golang.org/x/mobile/cmd/gobind@latest
275+
go install golang.org/x/mobile/cmd/gomobile@latest
276+
env PATH=$PATH:~/go/bin gomobile init
277+
echo "RCLONE_NDK_VERSION=21" >> $GITHUB_ENV
278+
279+
- name: arm-v7a gomobile build
280+
run: env PATH=$PATH:~/go/bin gomobile bind -androidapi ${RCLONE_NDK_VERSION} -v -target=android/arm -javapkg=org.rclone -ldflags '-s -X github.com/rclone/rclone/fs.Version='${VERSION} github.com/rclone/rclone/librclone/gomobile
281+
282+
- name: arm-v7a Set environment variables
283+
shell: bash
284+
run: |
285+
echo "CC=$(echo $ANDROID_NDK/toolchains/llvm/prebuilt/linux-x86_64/bin/armv7a-linux-androideabi${RCLONE_NDK_VERSION}-clang)" >> $GITHUB_ENV
286+
echo "CC_FOR_TARGET=$CC" >> $GITHUB_ENV
287+
echo 'GOOS=android' >> $GITHUB_ENV
288+
echo 'GOARCH=arm' >> $GITHUB_ENV
289+
echo 'GOARM=7' >> $GITHUB_ENV
290+
echo 'CGO_ENABLED=1' >> $GITHUB_ENV
291+
echo 'CGO_LDFLAGS=-fuse-ld=lld -s -w' >> $GITHUB_ENV
292+
293+
- name: arm-v7a build
294+
run: go build -v -tags android -trimpath -ldflags '-s -X github.com/rclone/rclone/fs.Version='${VERSION} -o build/rclone-android-${RCLONE_NDK_VERSION}-armv7a .
295+
296+
- name: arm64-v8a Set environment variables
297+
shell: bash
298+
run: |
299+
echo "CC=$(echo $ANDROID_NDK/toolchains/llvm/prebuilt/linux-x86_64/bin/aarch64-linux-android${RCLONE_NDK_VERSION}-clang)" >> $GITHUB_ENV
300+
echo "CC_FOR_TARGET=$CC" >> $GITHUB_ENV
301+
echo 'GOOS=android' >> $GITHUB_ENV
302+
echo 'GOARCH=arm64' >> $GITHUB_ENV
303+
echo 'CGO_ENABLED=1' >> $GITHUB_ENV
304+
echo 'CGO_LDFLAGS=-fuse-ld=lld -s -w' >> $GITHUB_ENV
305+
306+
- name: arm64-v8a build
307+
run: go build -v -tags android -trimpath -ldflags '-s -X github.com/rclone/rclone/fs.Version='${VERSION} -o build/rclone-android-${RCLONE_NDK_VERSION}-armv8a .
308+
309+
- name: x86 Set environment variables
310+
shell: bash
311+
run: |
312+
echo "CC=$(echo $ANDROID_NDK/toolchains/llvm/prebuilt/linux-x86_64/bin/i686-linux-android${RCLONE_NDK_VERSION}-clang)" >> $GITHUB_ENV
313+
echo "CC_FOR_TARGET=$CC" >> $GITHUB_ENV
314+
echo 'GOOS=android' >> $GITHUB_ENV
315+
echo 'GOARCH=386' >> $GITHUB_ENV
316+
echo 'CGO_ENABLED=1' >> $GITHUB_ENV
317+
echo 'CGO_LDFLAGS=-fuse-ld=lld -s -w' >> $GITHUB_ENV
318+
319+
- name: x86 build
320+
run: go build -v -tags android -trimpath -ldflags '-s -X github.com/rclone/rclone/fs.Version='${VERSION} -o build/rclone-android-${RCLONE_NDK_VERSION}-x86 .
321+
322+
- name: x64 Set environment variables
323+
shell: bash
324+
run: |
325+
echo "CC=$(echo $ANDROID_NDK/toolchains/llvm/prebuilt/linux-x86_64/bin/x86_64-linux-android${RCLONE_NDK_VERSION}-clang)" >> $GITHUB_ENV
326+
echo "CC_FOR_TARGET=$CC" >> $GITHUB_ENV
327+
echo 'GOOS=android' >> $GITHUB_ENV
328+
echo 'GOARCH=amd64' >> $GITHUB_ENV
329+
echo 'CGO_ENABLED=1' >> $GITHUB_ENV
330+
echo 'CGO_LDFLAGS=-fuse-ld=lld -s -w' >> $GITHUB_ENV
331+
332+
- name: x64 build
333+
run: go build -v -tags android -trimpath -ldflags '-s -X github.com/rclone/rclone/fs.Version='${VERSION} -o build/rclone-android-${RCLONE_NDK_VERSION}-x64 .
334+
335+
- name: Upload artifacts
336+
run: |
337+
make ci_upload
338+
env:
339+
RCLONE_CONFIG_PASS: ${{ secrets.RCLONE_CONFIG_PASS }}
340+
# Upload artifacts if not a PR && not a fork
341+
if: github.head_ref == '' && github.repository == 'rclone/rclone'

0 commit comments

Comments
 (0)