Skip to content

Commit

Permalink
v0.6.12 (#262)
Browse files Browse the repository at this point in the history
- Add --include-git-files option to xvc file track and xvc file list commands
- Don't track and list Git-tracked files by default
- Add ListFormat::empty for default xvc file list format
- Expose types from `xvc::file::list` to be used in GUI
- Refactor `xvc file list` command handler for Xvc GUI
- Began to use dtolnay/rust-toolchain for Github Actions
- Began to use taiki-e/install-action@cargo-llvm-cov for codecov 
- Fixed cache permissions issue
  • Loading branch information
iesahin authored Nov 30, 2024
1 parent ff50f1e commit f7f173d
Show file tree
Hide file tree
Showing 55 changed files with 1,513 additions and 793 deletions.
138 changes: 61 additions & 77 deletions .github/workflows/rust.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,21 +19,16 @@ jobs:

strategy:
matrix:
build: [nightly]
build: [stable]
include:
# - build: stable
# benches: true
# - build: beta
# rust: beta
- build: nightly
rust: nightly
- build: stable
rust: stable
# rust: nightly-2024-01-01
test-args: --features test-ci # --no-fail-fast
## for submitters other than me, I'll add another job here.
# test-args: --no-fail-fast
# test-args: --all-features
# benches: true
coverage: true

env:
AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }}
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
Expand All @@ -52,17 +47,14 @@ jobs:
# We don't run xvc-storage and how-to tests here
XVC_TRYCMD_TESTS: core,file,pipeline,intro,start,storage
XVC_TRYCMD_STORAGE_TESTS: minio,generic,local,

steps:
- name: Checkout
uses: actions/checkout@v1

# - name: Install required packages
#
# run: sudo apt install -y inotify-tools ripgrep s3cmd

- name: Install required packages
run: |
brew install --head s3cmd # 2.3.0 has a bug with Python 3.12
brew install s3cmd
brew install ripgrep
brew install tree
brew install lsd
Expand All @@ -72,73 +64,74 @@ jobs:
- name: Git config for automated Git tests
run: git config --global user.name 'Xvc Rabbit' && git config --global user.email '[email protected]' && git config --global init.defaultBranch main

- name: Write the private key file for one.emresult.com connection
- name: Write the private key file for e1.xvc.dev connection
run: mkdir -p $HOME/.ssh/ && echo "${XVC_TEST_ONE_EMRESULT_COM_KEY}" > $HOME/.ssh/id_rsa ; chmod 600 ~/.ssh/id_rsa

- name: Write an ssh config to allow connection
run: echo 'Host *' >> $HOME/.ssh/config ; echo ' StrictHostKeyChecking no' >> $HOME/.ssh/config ; chmod 400 $HOME/.ssh/config

- name: List .ssh contents
run: ls -R $HOME/.ssh ; cat $HOME/.ssh/id_rsa ; cat $HOME/.ssh/config
- name: Write an ssh config to allow connection without noise
run: echo 'Host *' >> $HOME/.ssh/config ; echo ' StrictHostKeyChecking no' >> $HOME/.ssh/config ; echo ' LogLevel ERROR' >> $HOME/.ssh/config ; chmod 400 $HOME/.ssh/config

# - name: List .ssh contents
# run: ls -R $HOME/.ssh ; cat $HOME/.ssh/id_rsa ; cat $HOME/.ssh/config
#
- name: Install rust
uses: actions-rs/toolchain@v1
uses: dtolnay/rust-toolchain@master
with:
toolchain: ${{ matrix.rust || 'stable' }}
profile: minimal
components: llvm-tools-preview
override: true

- name: Build debug
uses: actions-rs/cargo@v1
with:
command: build
args: ${{ matrix.build-args }}
run: cargo build ${{ matrix.build-args }}
env:
RUSTFLAGS: "-A dead_code"

- name: Add xvc to PATH
run: echo "${GITHUB_WORKSPACE}/target/debug" >> $GITHUB_PATH

- name: Print contents of $GITHUB_WORKSPACE
run: tree $GITHUB_WORKSPACE
# - name: Print contents of $GITHUB_WORKSPACE
# run: tree $GITHUB_WORKSPACE

- name: Check if xvc is in PATH
run: tree $GITHUB_WORKSPACE && xvc --help
# run: tree $GITHUB_WORKSPACE && xvc --version
run: xvc --version

# - name: Test
# if: matrix.coverage
# run: cargo test ${{ matrix.test-args }}
# env:
# CARGO_INCREMENTAL: "0"
# # To debug the output when commands fail
# TRYCMD: "dump"
# # RUSTFLAGS: "-Ccodegen-units=1 -Cinline-threshold=0 -Clink-dead-code -Coverflow-checks=off"
# RUSTFLAGS: "-Cinstrument-coverage"
# # RUSTDOCFLAGS: "-Ccodegen-units=1 -Cinline-threshold=0 -Clink-dead-code -Coverflow-checks=off"
# LLVM_PROFILE_FILE: "${TMPDIR}/xvc-%p-%m.profraw"
#
- name: Install cargo-llvm-cov
if: matrix.coverage
uses: taiki-e/install-action@cargo-llvm-cov

- name: Run Current Dev Tests
run: $GITHUB_WORKSPACE/run-tests.zsh

- name: Test
- name: Test and Coverage
id: coverage
if: matrix.coverage
uses: actions-rs/cargo@v1
with:
command: test
args: ${{ matrix.test-args }}
run: cargo llvm-cov ${{ matrix.test-args }} --workspace --lcov --output-path lcov.info
env:
CARGO_INCREMENTAL: "0"
# To debug the output when commands fail
TRYCMD: "dump"
RUSTFLAGS: "-Zprofile -Ccodegen-units=1 -Cinline-threshold=0 -Clink-dead-code -Coverflow-checks=off"
RUSTDOCFLAGS: "-Zprofile -Ccodegen-units=1 -Cinline-threshold=0 -Clink-dead-code -Coverflow-checks=off"
- name: Coverage
id: coverage
if: matrix.coverage
uses: actions-rs/[email protected]
- name: Test all benches
if: matrix.benches
uses: actions-rs/cargo@v1
with:
command: test
args: --benches ${{ matrix.features }}

- name: Upload to codecov.io
if: matrix.coverage
uses: codecov/codecov-action@v2
uses: codecov/codecov-action@v3
with:
token: ${{ secrets.CODECOV_TOKEN }}
files: ${{ steps.coverage.outputs.report }}

- name: Test all benches
if: matrix.benches
run: cargo test --benches ${{ matrix.features }}

deploy-linux:
name: deploy-linux
# needs: [coverage]
Expand All @@ -147,31 +140,28 @@ jobs:
strategy:
matrix:
target: [x86_64-unknown-linux-gnu]

steps:
- name: Checkout
uses: actions/checkout@v1

- name: Install rust
uses: actions-rs/toolchain@v1
uses: dtolnay/rust-toolchain@master
with:
toolchain: stable
profile: minimal
override: true
target: ${{ matrix.target }}
targets: ${{ matrix.target }}

- name: Build target
uses: actions-rs/cargo@v1
with:
use-cross: false
command: build
args: --release --target ${{ matrix.target }} --features=bundled-openssl
run: cargo build --release --target ${{ matrix.target }} --features=bundled-openssl

- name: Package
shell: bash
run: |
#strip target/${{ matrix.target }}/release/xvc
cd target/${{ matrix.target }}/release
tar czvf ../../../xvc-${{ github.ref_name}}-${{ matrix.target }}.tar.gz xvc
tar czvf ../../../xvc-${{ github.ref_name }}-${{ matrix.target }}.tar.gz xvc
cd -
- name: Publish
uses: softprops/action-gh-release@v1
# TODO: if any of the build step fails, the release should be deleted.
Expand All @@ -191,20 +181,15 @@ jobs:
steps:
- name: Checkout
uses: actions/checkout@v1

- name: Install rust
uses: actions-rs/toolchain@v1
uses: dtolnay/rust-toolchain@master
with:
toolchain: stable
profile: minimal
override: true
target: ${{ matrix.target }}
targets: ${{ matrix.target }}

- name: Build target
uses: actions-rs/cargo@v1
with:
use-cross: false
command: build
args: --release --target ${{ matrix.target }} --features bundled-sqlite
run: cargo build --release --target ${{ matrix.target }} --features bundled-sqlite

- name: Package
shell: bash
Expand All @@ -213,13 +198,15 @@ jobs:
cd target/${{ matrix.target }}/release
tar czvf ../../../xvc-${{ github.ref_name}}-${{ matrix.target }}.tar.gz xvc
cd -
- name: Publish
uses: softprops/action-gh-release@v1
# TODO: if any of the build step fails, the release should be deleted.
with:
files: "xvc*"
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

deploy-macos:
name: deploy-macos
# needs: [coverage]
Expand All @@ -228,23 +215,19 @@ jobs:
strategy:
matrix:
target: [x86_64-apple-darwin]

steps:
- name: Checkout
uses: actions/checkout@v1

- name: Install rust
uses: actions-rs/toolchain@v1
uses: dtolnay/rust-toolchain@master
with:
toolchain: stable
profile: minimal
override: true
target: ${{ matrix.target }}
targets: ${{ matrix.target }}

- name: Build target
uses: actions-rs/cargo@v1
with:
use-cross: false
command: build
args: --release --target ${{ matrix.target }}
run: cargo build --release --target ${{ matrix.target }}

- name: Package
shell: bash
Expand All @@ -253,6 +236,7 @@ jobs:
cd target/${{ matrix.target }}/release
tar czvf ../../../xvc-${{ github.ref_name}}-${{ matrix.target }}.tar.gz xvc
cd -
- name: Publish
uses: softprops/action-gh-release@v1
# TODO: if any of the build step fails, the release should be deleted.
Expand Down
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -17,3 +17,6 @@ Cargo.lock
flamegraph.svg
workflow_tests/docs
lib/docs
# Ignore all profiling files
*.profraw
lcov.info
13 changes: 12 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,9 +1,20 @@
# Xvc Changelog

## Unreleased
## 0.6.12 (2024-11-30)

- PR: <https://github.com/iesahin/xvc/pull/262>
- Add --include-git-files option to xvc file track and xvc file list commands
- Don't track and list Git-tracked files by default
- Add ListFormat::empty for default xvc file list format
- Expose types from `xvc::file::list` to be used in GUI
- Refactor `xvc file list` command handler for Xvc GUI
- Began to use dtolnay/rust-toolchain for Github Actions
- Began to use taiki-e/install-action@cargo-llvm-cov for codecov
- Fixed cache permissions issue

## 0.6.11 (2024-09-04)

- PR: <https://github.com/iesahin/xvc/pull/260>
- Bump dependencies
- Replace globset with fast-glob for memory usage
- Remove --details option from xvc check-ignore
Expand Down
3 changes: 3 additions & 0 deletions book/src/ref/xvc-file-carry-in.md
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,7 @@ $ xvc file track data.txt

$ xvc file list data.txt
FC 19 [..] c85f3e81 c85f3e81 data.txt

Total #: 1 Workspace Size: 19 Cached Size: 19


Expand All @@ -67,6 +68,7 @@ Oh, deetee, my, deetee

$ xvc file list data.txt
FC 23 [..] c85f3e81 e37c686a data.txt

Total #: 1 Workspace Size: 23 Cached Size: 19


Expand All @@ -79,6 +81,7 @@ $ xvc file carry-in data.txt

$ xvc file list data.txt
FC 23 [..] e37c686a e37c686a data.txt

Total #: 1 Workspace Size: 23 Cached Size: 23


Expand Down
6 changes: 5 additions & 1 deletion book/src/ref/xvc-file-copy.md
Original file line number Diff line number Diff line change
Expand Up @@ -83,12 +83,14 @@ Note that, multiple copies of the same content don't add up to the cache size.
```console
$ xvc file list data.txt
FC 19 [..] c85f3e81 c85f3e81 data.txt

Total #: 1 Workspace Size: 19 Cached Size: 19


$ xvc file list 'data*'
FC 19 [..] c85f3e81 c85f3e81 data2.txt
FC 19 [..] c85f3e81 c85f3e81 data.txt

Total #: 2 Workspace Size: 38 Cached Size: 19


Expand All @@ -115,6 +117,7 @@ $ xvc file list another-set/
FH 19 [..] c85f3e81 c85f3e81 another-set/data3.txt
FH 19 [..] c85f3e81 c85f3e81 another-set/data2.txt
FH 19 [..] c85f3e81 c85f3e81 another-set/data.txt

Total #: 3 Workspace Size: 57 Cached Size: 19


Expand Down Expand Up @@ -169,7 +172,8 @@ FH 19 [..] c85f3e81 c85f3e81 another-set/data3.txt
FH 19 [..] c85f3e81 c85f3e81 another-set/data2.txt
FH 19 [..] c85f3e81 c85f3e81 another-set/data.txt
DX 160 [..] another-set
Total #: 9 Workspace Size: [..] Cached Size: 19

Total #: 9 Workspace Size: [..] Cached Size: 19


```
Expand Down
Loading

0 comments on commit f7f173d

Please sign in to comment.