Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
38 commits
Select commit Hold shift + click to select a range
bbbcb85
add clap, strip bom
7ERr0r Jan 11, 2023
1e30a34
parallel zip
7ERr0r Jan 11, 2023
cde3fc9
sorting works
7ERr0r Jan 11, 2023
719a29c
main hashmap is now optional
7ERr0r Jan 11, 2023
b4bf5c4
refactor
7ERr0r Jan 12, 2023
6ff3608
more refactor into .rs files
7ERr0r Jan 12, 2023
de1c375
add sha2 + refactor restoring
7ERr0r Jan 12, 2023
22856bd
remove allocations
7ERr0r Jan 12, 2023
63ede5a
disable hasher for 0-size files
7ERr0r Jan 12, 2023
6ff1c32
cargo fmt
7ERr0r Jan 12, 2023
4d3a438
cleanup Cargo.toml
7ERr0r Jan 12, 2023
7efb787
fix clap args
7ERr0r Jan 12, 2023
4a99c37
update readme
7ERr0r Jan 12, 2023
24c0b0f
dev as fast as --release
7ERr0r Jan 12, 2023
9cd2359
add github workflow
7ERr0r Jan 12, 2023
3ec9add
fix clippy
7ERr0r Jan 12, 2023
b1974f2
fix workflow
7ERr0r Jan 12, 2023
c9dd711
windows build
7ERr0r Jan 12, 2023
64f06a5
archive binary files
7ERr0r Jan 12, 2023
c6e10a1
cleanup
7ERr0r Jan 12, 2023
70ac81d
allow verification without write
7ERr0r Jan 12, 2023
96d6416
github workflow: add apt gcc-mingw-w64-x86-64
7ERr0r Jan 12, 2023
7e9bb97
github workflow: sudo
7ERr0r Jan 12, 2023
e78ee0e
workflow: rust.yml
7ERr0r Jan 12, 2023
499ae9a
workflow rust fix
7ERr0r Jan 12, 2023
7d3536a
apt install musl
7ERr0r Jan 12, 2023
a6df2ab
disable musl
7ERr0r Jan 12, 2023
3f262db
perf: remove buffer allocations per-block
7ERr0r Jan 12, 2023
a03d43c
dhat fix
7ERr0r Jan 12, 2023
eb7b83b
bump version
7ERr0r Jan 12, 2023
92ca7bb
add workflow permission write
7ERr0r Jan 12, 2023
7cd16a7
update dependencies
7ERr0r Jan 12, 2023
c9549f7
fix: decode_vec len
7ERr0r Jan 12, 2023
61d5349
refactor: more readable code with less blocks
7ERr0r Jan 14, 2023
e452d2f
refactor sorting
7ERr0r Jan 15, 2023
107b0ff
v0.0.6
7ERr0r Jan 15, 2023
6859c44
refactor for better readability
7ERr0r Jan 17, 2023
d38c232
more cleanup
7ERr0r Jan 17, 2023
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
52 changes: 52 additions & 0 deletions .github/workflows/ci.yml.unused
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
name: CI

# This workflow run tests and build for each push

on:
push:
branches:
- main
- master

jobs:

all_duplicati_restore:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2

- name: Update local toolchain
run: |
rustup update
rustup component add clippy
rustup target add x86_64-pc-windows-gnu
sudo apt-get install -y gcc-mingw-w64-x86-64

- name: Toolchain info
run: |
cargo --version --verbose
rustc --version
cargo clippy --version

- name: Lint
run: |
cargo fmt -- --check
cargo clippy -- -D warnings

- name: Test
run: |
cargo check
cargo test --all

- name: Build
run: |
cargo build --release
cargo build --release --target x86_64-pc-windows-gnu

- name: Archive production artifacts
uses: actions/upload-artifact@v3
with:
name: target binaries
path: |
target/release/rust-duplicati-restore
target/x86_64-pc-windows-gnu/release/rust-duplicati-restore.exe
146 changes: 146 additions & 0 deletions .github/workflows/rust.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,146 @@
name: Rust

on:
push:
# pull_request:

env:
CARGO_TERM_COLOR: always

defaults:
run:
# necessary for windows
shell: bash

jobs:
test:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Cargo cache
uses: actions/cache@v2
with:
path: |
~/.cargo/registry
./target
key: test-cargo-registry
- name: List
run: find ./
- name: Run tests
run: cargo test --verbose

build:
strategy:
fail-fast: false
matrix:
# a list of all the targets
include:
- TARGET: x86_64-unknown-linux-gnu # tested in a debian container on a mac
OS: ubuntu-latest
# - TARGET: x86_64-unknown-linux-musl # test in an alpine container on a mac
# OS: ubuntu-latest
- TARGET: aarch64-unknown-linux-gnu # tested on aws t4g.nano
OS: ubuntu-latest
# - TARGET: aarch64-unknown-linux-musl # tested on aws t4g.nano in alpine container
# OS: ubuntu-latest
- TARGET: armv7-unknown-linux-gnueabihf # raspberry pi 2-3-4, not tested
OS: ubuntu-latest
# - TARGET: armv7-unknown-linux-musleabihf # raspberry pi 2-3-4, not tested
# OS: ubuntu-latest
- TARGET: arm-unknown-linux-gnueabihf # raspberry pi 0-1, not tested
OS: ubuntu-latest
# - TARGET: arm-unknown-linux-musleabihf # raspberry pi 0-1, not tested
# OS: ubuntu-latest
- TARGET: x86_64-apple-darwin # tested on a mac, is not properly signed so there are security warnings
OS: macos-latest
- TARGET: x86_64-pc-windows-msvc # tested on a windows machine
OS: windows-latest
needs: test
runs-on: ${{ matrix.OS }}
env:
NAME: rust-duplicati-restore
TARGET: ${{ matrix.TARGET }}
OS: ${{ matrix.OS }}
steps:
- uses: actions/checkout@v2
- name: Cargo cache
uses: actions/cache@v2
with:
path: |
~/.cargo/registry
./target
key: build-cargo-registry-${{matrix.TARGET}}
- name: List
run: find ./
- name: Install and configure dependencies
run: |
# dependencies are only needed on ubuntu as that's the only place where
# we make cross-compilation
if [[ $OS =~ ^ubuntu.*$ ]]; then
sudo apt-get install -qq crossbuild-essential-arm64 crossbuild-essential-armhf musl musl-tools musl-dev
fi

# some additional configuration for cross-compilation on linux
cat >>~/.cargo/config <<EOF
[target.aarch64-unknown-linux-gnu]
linker = "aarch64-linux-gnu-gcc"
[target.aarch64-unknown-linux-musl]
linker = "aarch64-linux-gnu-gcc"
[target.armv7-unknown-linux-gnueabihf]
linker = "arm-linux-gnueabihf-gcc"
[target.armv7-unknown-linux-musleabihf]
linker = "arm-linux-gnueabihf-gcc"
[target.arm-unknown-linux-gnueabihf]
linker = "arm-linux-gnueabihf-gcc"
[target.arm-unknown-linux-musleabihf]
linker = "arm-linux-gnueabihf-gcc"
EOF
- name: Install rust target
run: rustup target add $TARGET
- name: Run build
run: cargo build --release --verbose --target $TARGET
- name: List target
run: find ./target
- name: Compress
run: |
mkdir -p ./artifacts
# windows is the only OS using a different convention for executable file name
if [[ $OS =~ ^windows.*$ ]]; then
EXEC=$NAME.exe
else
EXEC=$NAME
fi
if [[ $GITHUB_REF_TYPE =~ ^tag$ ]]; then
TAG=$GITHUB_REF_NAME
else
TAG=$GITHUB_SHA
fi
mv ./target/$TARGET/release/$EXEC ./$EXEC
tar -czf ./artifacts/$NAME-$TARGET-$TAG.tar.gz $EXEC
- name: Archive artifact
uses: actions/upload-artifact@v2
with:
name: result
path: |
./artifacts

# deploys to github releases on tag
deploy:
if: startsWith(github.ref, 'refs/tags/')
needs: build
runs-on: ubuntu-latest
permissions:
contents: write
packages: write
steps:
- name: Download artifacts
uses: actions/download-artifact@v2
with:
name: result
path: ./artifacts
- name: List
run: find ./artifacts
- name: Release
uses: softprops/action-gh-release@v1
with:
files: ./artifacts/*.tar.gz
7 changes: 7 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,10 @@
/target
**/*.rs.bk
**/*.py
/Cargo.lock

/debug_*.json
/testout
/dhat-heap*.json
.vscode/settings.json
testrun.sh
Loading