Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
66 commits
Select commit Hold shift + click to select a range
4e9ba72
feat: add doi as a new backend
leafty Mar 21, 2025
7dc541e
wip: can list and download files
leafty Mar 21, 2025
4d3d674
draft for handling DOIs
leafty Mar 21, 2025
70fa8b5
build: make it work for our fork
leafty Mar 21, 2025
6e09f0b
do not include git log
leafty Mar 21, 2025
5914754
upload artifacts
leafty Mar 21, 2025
0d2959c
improve doi handling
leafty Mar 21, 2025
37c773b
reject DOIs which are not from Zenodo
leafty Mar 21, 2025
7840368
fix lint issues
leafty Mar 21, 2025
4cea7cc
build: use current workflows
leafty Mar 21, 2025
07925a1
fix root
leafty Mar 21, 2025
473e4fd
Revert "build: use current workflows"
leafty Mar 21, 2025
89784c3
fix range headers
leafty Mar 21, 2025
63af447
only build linux for now
leafty Mar 21, 2025
775391c
improve debug
leafty Mar 22, 2025
d75646f
build: specific build for Renku
leafty Mar 24, 2025
b5c69a0
draft: build image
leafty Mar 24, 2025
316bdfc
build: try to build an image
leafty Mar 24, 2025
4ac51bf
implement modtime and hashes
leafty Mar 24, 2025
224a27b
feat: support DOIs from dataverse
leafty Mar 24, 2025
d96ef12
fix tabular data format
leafty Mar 24, 2025
c4d6112
refactor DOI resolution
leafty Mar 25, 2025
966a27c
improve doi parsing
leafty Mar 26, 2025
83b86c3
refactor zenodo handling
leafty Mar 26, 2025
b04a51b
improve List() for Zenodo
leafty Mar 26, 2025
4e7bd8a
fix NewObject() issue
leafty Mar 26, 2025
0ceac76
wip: subfolders
leafty Mar 26, 2025
003be30
wip: use rest client
leafty Mar 26, 2025
8689063
wip: support subfolders on dataverse
leafty Mar 26, 2025
fc67cad
wip: support subfolders on dataverse
leafty Mar 26, 2025
42b9efe
add logging for file reads
leafty Mar 27, 2025
ad36649
fix tabular data quirk
leafty Mar 27, 2025
5afa52c
cleanup
leafty Mar 27, 2025
213682e
some cleanup
leafty Mar 27, 2025
5cd1e9e
restore backend/doi/link_header.go (will be used for invenio
leafty Mar 27, 2025
8a521a2
wip: support invenio
leafty Mar 28, 2025
e7be75a
fix cache
leafty Mar 28, 2025
b0244bb
fix for CaltechData
leafty Mar 28, 2025
a38bd54
refactor doi
leafty Mar 31, 2025
ca8f985
some code cleanup
leafty Mar 31, 2025
875a9de
improve invenio resolution
leafty Mar 31, 2025
f8da408
lint
leafty Mar 31, 2025
0e1b656
lint
leafty Mar 31, 2025
d0fa3fc
improve dataverse subfolder code
leafty Apr 1, 2025
ab54d27
fix
leafty Apr 1, 2025
18a56ad
fix
leafty Apr 1, 2025
92133bd
add pacer to doi backend
leafty Apr 2, 2025
8441f23
refactor resolveEndpoint()
leafty Apr 2, 2025
6a17117
implement show title
leafty Apr 2, 2025
bf6cd81
improve auto-detect and add backend provider command
leafty Apr 2, 2025
f6e1d95
fix lint
leafty Apr 2, 2025
93264d5
start doi.mod documentaion
leafty Apr 3, 2025
d93097f
small refactor
leafty Apr 3, 2025
0e5e300
fix trim
leafty Apr 8, 2025
1a32af4
fix link header
leafty Apr 8, 2025
96b93d9
try handling DiskSpaceTotalSize in cache cleanup
leafty Apr 11, 2025
507acf5
wip: total cache use?
leafty Apr 11, 2025
aa5444f
wip: total cache used
leafty Apr 14, 2025
2f227e9
logging
leafty Apr 14, 2025
f594530
lint
leafty Apr 14, 2025
9445213
info cmd
leafty Apr 15, 2025
58ded0c
log cleanup
leafty Apr 15, 2025
f476e0f
cleanup
leafty Apr 15, 2025
5227f77
improve docs
leafty Apr 15, 2025
a1647a7
try build for linux/amd64,linux/arm64
leafty Apr 16, 2025
655948c
fix lint
leafty Apr 16, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
247 changes: 247 additions & 0 deletions .github/workflows/build-renku.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,247 @@
name: Build rclone for Renku

# Trigger the workflow on push or pull request
on:
push:
branches:
- "**"
tags:
- "**"
pull_request:
workflow_dispatch:
inputs:
manual:
description: Manual run (bypass default conditions)
type: boolean
required: true
default: true

env:
REGISTRY: ghcr.io
IMAGE_NAME: ${{ github.repository }}

jobs:
build:
if: inputs.manual || (github.event_name != 'pull_request' || github.event.pull_request.head.repo.full_name != github.event.pull_request.base.repo.full_name)
timeout-minutes: 60
strategy:
fail-fast: false
matrix:
job_name: ["linux"]

include:
- job_name: linux
os: ubuntu-latest
go: "1.21"
gotags: cmount
build_flags: '-include "linux/amd64|linux/arm64"'
deploy: true

name: ${{ matrix.job_name }}

runs-on: ${{ matrix.os }}

steps:
- name: Checkout
uses: actions/checkout@v4
with:
fetch-depth: 0

- name: Install Go
uses: actions/setup-go@v5
with:
go-version: ${{ matrix.go }}
check-latest: true

- name: Set environment variables
shell: bash
run: |
echo 'GOTAGS=${{ matrix.gotags }}' >> $GITHUB_ENV
echo 'BUILD_FLAGS=${{ matrix.build_flags }}' >> $GITHUB_ENV
echo 'BUILD_ARGS=${{ matrix.build_args }}' >> $GITHUB_ENV
if [[ "${{ matrix.goarch }}" != "" ]]; then echo 'GOARCH=${{ matrix.goarch }}' >> $GITHUB_ENV ; fi
if [[ "${{ matrix.cgo }}" != "" ]]; then echo 'CGO_ENABLED=${{ matrix.cgo }}' >> $GITHUB_ENV ; fi

- name: Install Libraries on Linux
shell: bash
run: |
sudo modprobe fuse
sudo chmod 666 /dev/fuse
sudo chown root:$USER /etc/fuse.conf
sudo apt-get install fuse3 libfuse-dev rpm pkg-config
if: matrix.os == 'ubuntu-latest'

- name: Install Libraries on macOS
shell: bash
run: |
# https://github.com/Homebrew/brew/issues/15621#issuecomment-1619266788
# https://github.com/orgs/Homebrew/discussions/4612#discussioncomment-6319008
unset HOMEBREW_NO_INSTALL_FROM_API
brew untap --force homebrew/core
brew untap --force homebrew/cask
brew update
brew install --cask macfuse
if: matrix.os == 'macos-11'

- name: Install Libraries on Windows
shell: powershell
run: |
$ProgressPreference = 'SilentlyContinue'
choco install -y winfsp zip
echo "CPATH=C:\Program Files\WinFsp\inc\fuse;C:\Program Files (x86)\WinFsp\inc\fuse" | Out-File -FilePath $env:GITHUB_ENV -Encoding utf8 -Append
if ($env:GOARCH -eq "386") {
choco install -y mingw --forcex86 --force
echo "C:\\ProgramData\\chocolatey\\lib\\mingw\\tools\\install\\mingw32\\bin" | Out-File -FilePath $env:GITHUB_PATH -Encoding utf8 -Append
}
# Copy mingw32-make.exe to make.exe so the same command line
# can be used on Windows as on macOS and Linux
$path = (get-command mingw32-make.exe).Path
Copy-Item -Path $path -Destination (Join-Path (Split-Path -Path $path) 'make.exe')
if: matrix.os == 'windows-latest'

- name: Print Go version and environment
shell: bash
run: |
printf "Using go at: $(which go)\n"
printf "Go version: $(go version)\n"
printf "\n\nGo environment:\n\n"
go env
printf "\n\nRclone environment:\n\n"
make vars
printf "\n\nSystem environment:\n\n"
env

- name: Go module cache
uses: actions/cache@v4
with:
path: ~/go/pkg/mod
key: ${{ runner.os }}-go-${{ hashFiles('**/go.sum') }}
restore-keys: |
${{ runner.os }}-go-

- name: Build rclone
shell: bash
run: |
make

- name: Rclone version
shell: bash
run: |
rclone version

- name: Run tests
shell: bash
run: |
make quicktest
if: matrix.quicktest

- name: Race test
shell: bash
run: |
make racequicktest
if: matrix.racequicktest

- name: Run librclone tests
shell: bash
run: |
make -C librclone/ctest test
make -C librclone/ctest clean
librclone/python/test_rclone.py
if: matrix.librclonetest

- name: Compile all architectures test
shell: bash
run: |
make
make compile_all
if: matrix.compile_all

- name: Build binaries for release
shell: bash
run: |
if [[ "${{ matrix.os }}" == "ubuntu-latest" ]]; then make release_dep_linux ; fi
make ci_gha
ls -al build/
if: matrix.deploy

- name: Upload artifacts to GitHub
uses: actions/upload-artifact@v4
with:
name: build-${{ matrix.job_name }}
path: build
retention-days: 1
if: matrix.deploy

image:
if: inputs.manual || (github.event_name != 'pull_request' || github.event.pull_request.head.repo.full_name != github.event.pull_request.base.repo.full_name)
timeout-minutes: 60
runs-on: ubuntu-latest
needs: [build]

steps:
- name: Checkout
uses: actions/checkout@v4
with:
fetch-depth: 0

- name: Download artifacts
uses: actions/download-artifact@v4
with:
name: build-linux
path: rclone

- name: List downloaded files
run: ls -R rclone

- name: Extract rclone binary - amd64
run: |
unzip "rclone/*-amd64.zip" -d rclone-unzip
ls -R rclone-unzip
mkdir -p linux/amd64
mv rclone-unzip/*/rclone linux/amd64/rclone

- name: Extract rclone binary - arm64
run: |
unzip "rclone/*-arm64.zip" -d rclone-unzip
ls -R rclone-unzip
mkdir -p linux/arm64
mv rclone-unzip/*/rclone linux/arm64/rclone

- name: Docker image metadata
id: meta
uses: docker/metadata-action@v5
with:
images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}
tags: type=sha

- name: Extract Docker image name
id: docker_image
env:
IMAGE_TAGS: ${{ steps.meta.outputs.tags }}
run: |
IMAGE=$(echo "$IMAGE_TAGS" | cut -d" " -f1)
IMAGE_REPOSITORY=$(echo "$IMAGE" | cut -d":" -f1)
IMAGE_TAG=$(echo "$IMAGE" | cut -d":" -f2)
echo "image=$IMAGE" >> "$GITHUB_OUTPUT"
echo "image_repository=$IMAGE_REPOSITORY" >> "$GITHUB_OUTPUT"
echo "image_tag=$IMAGE_TAG" >> "$GITHUB_OUTPUT"

- name: Set up Docker buildx
uses: docker/setup-buildx-action@v3

- name: Set up Docker
uses: docker/login-action@v3
with:
registry: ${{ env.REGISTRY }}
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}

- name: Build and push Docker image
uses: docker/build-push-action@v6
with:
context: .
file: .renku/Dockerfile
platforms: linux/amd64,linux/arm64
push: true
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}
106 changes: 61 additions & 45 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,12 +22,12 @@ on:

jobs:
build:
if: ${{ github.event.inputs.manual == 'true' || (github.repository == 'rclone/rclone' && (github.event_name != 'pull_request' || github.event.pull_request.head.repo.full_name != github.event.pull_request.base.repo.full_name)) }}
if: inputs.manual || (github.event_name != 'pull_request' || github.event.pull_request.head.repo.full_name != github.event.pull_request.base.repo.full_name)
timeout-minutes: 60
strategy:
fail-fast: false
matrix:
job_name: ['linux', 'linux_386', 'mac_amd64', 'mac_arm64', 'windows', 'other_os', 'go1.19', 'go1.20']
job_name: ['linux', 'linux_386', 'go1.19', 'go1.20']

include:
- job_name: linux
Expand All @@ -48,38 +48,38 @@ jobs:
gotags: cmount
quicktest: true

- job_name: mac_amd64
os: macos-11
go: '1.21'
gotags: 'cmount'
build_flags: '-include "^darwin/amd64" -cgo'
quicktest: true
racequicktest: true
deploy: true

- job_name: mac_arm64
os: macos-11
go: '1.21'
gotags: 'cmount'
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
os: windows-latest
go: '1.21'
gotags: cmount
cgo: '0'
build_flags: '-include "^windows/"'
build_args: '-buildmode exe'
quicktest: true
deploy: true

- job_name: other_os
os: ubuntu-latest
go: '1.21'
build_flags: '-exclude "^(windows/|darwin/|linux/)"'
compile_all: true
deploy: true
# - job_name: mac_amd64
# os: macos-11
# go: '1.21'
# gotags: 'cmount'
# build_flags: '-include "^darwin/amd64" -cgo'
# quicktest: true
# racequicktest: true
# deploy: true

# - job_name: mac_arm64
# os: macos-11
# go: '1.21'
# gotags: 'cmount'
# 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
# os: windows-latest
# go: '1.21'
# gotags: cmount
# cgo: '0'
# build_flags: '-include "^windows/"'
# build_args: '-buildmode exe'
# quicktest: true
# deploy: true

# - job_name: other_os
# os: ubuntu-latest
# go: '1.21'
# build_flags: '-exclude "^(windows/|darwin/|linux/)"'
# compile_all: true
# deploy: true

- job_name: go1.19
os: ubuntu-latest
Expand Down Expand Up @@ -212,19 +212,35 @@ jobs:
make compile_all
if: matrix.compile_all

- name: Deploy built binaries
shell: bash
run: |
if [[ "${{ matrix.os }}" == "ubuntu-latest" ]]; then make release_dep_linux ; fi
make ci_beta
env:
RCLONE_CONFIG_PASS: ${{ secrets.RCLONE_CONFIG_PASS }}
# working-directory: '$(modulePath)'
# Deploy binaries if enabled in config && not a PR && not a fork
if: env.RCLONE_CONFIG_PASS != '' && matrix.deploy && github.head_ref == '' && github.repository == 'rclone/rclone'
# - name: Build binaries for release
# shell: bash
# run: |
# if [[ "${{ matrix.os }}" == "ubuntu-latest" ]]; then make release_dep_linux ; fi
# make ci_gha
# ls -al build/
# if: matrix.deploy

# - name: Upload artifacts to GitHub
# uses: actions/upload-artifact@v4
# with:
# name: build-${{ matrix.job_name }}
# path: build
# retention-days: 1
# if: matrix.deploy

# - name: Deploy built binaries
# shell: bash
# run: |
# if [[ "${{ matrix.os }}" == "ubuntu-latest" ]]; then make release_dep_linux ; fi
# make ci_beta
# env:
# RCLONE_CONFIG_PASS: ${{ secrets.RCLONE_CONFIG_PASS }}
# # working-directory: '$(modulePath)'
# # Deploy binaries if enabled in config && not a PR && not a fork
# if: env.RCLONE_CONFIG_PASS != '' && matrix.deploy && github.head_ref == '' && github.repository == 'rclone/rclone'

lint:
if: ${{ github.event.inputs.manual == 'true' || (github.repository == 'rclone/rclone' && (github.event_name != 'pull_request' || github.event.pull_request.head.repo.full_name != github.event.pull_request.base.repo.full_name)) }}
if: inputs.manual || (github.event_name != 'pull_request' || github.event.pull_request.head.repo.full_name != github.event.pull_request.base.repo.full_name)
timeout-minutes: 30
name: "lint"
runs-on: ubuntu-latest
Expand Down
3 changes: 3 additions & 0 deletions .renku/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
FROM scratch
ARG TARGETPLATFORM
COPY ${TARGETPLATFORM}/rclone rclone
3 changes: 3 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -233,6 +233,9 @@ ifeq ($(or $(BRANCH_PATH),$(RELEASE_TAG)),)
endif
@echo Beta release ready at $(BETA_URL)

ci_gha:
go run bin/cross-compile.go $(BUILD_FLAGS) $(BUILDTAGS) $(BUILD_ARGS) $(TAG)

# Fetch the binary builds from GitHub actions
fetch_binaries:
rclone -P sync --exclude "/testbuilds/**" --delete-excluded $(BETA_UPLOAD) build/
Expand Down
Loading
Loading