Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Implement v0.1.0 #1

Merged
merged 32 commits into from
Feb 20, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
32 commits
Select commit Hold shift + click to select a range
d631985
Implement basic stuff
brusherru Jan 11, 2024
6588bb3
Remove build from go-spacemesh version
brusherru Jan 11, 2024
817fedd
Add printing downloading & unzipping progress
brusherru Jan 11, 2024
1ef8ef7
Move readme
brusherru Jan 11, 2024
d0db29b
Change argument defaults
brusherru Jan 11, 2024
f5698cc
Handle non-200 responses properly
brusherru Jan 11, 2024
67c9ea3
Validate md5 checksum on unpacked state.sql
brusherru Jan 11, 2024
952db95
Refactor: move functions in separate modules
brusherru Jan 12, 2024
ad75598
Show error if archive is not unpacked well / entirely
brusherru Jan 12, 2024
a1c0ea9
Handle errors properly
brusherru Jan 12, 2024
0103411
Add error codes in README.md
brusherru Jan 12, 2024
7ac1e8c
refactor: follow @poszu recommendations
brusherru Jan 31, 2024
85ddd83
refactor: rustfmt
brusherru Feb 1, 2024
5da260e
refactor: clippy
brusherru Feb 1, 2024
debec7a
feat: add CI
brusherru Feb 1, 2024
511a9c9
refactor: use blocking API instead of async
brusherru Feb 7, 2024
d26cb72
refactor: use anyhow::Result and don't mess with Errors
brusherru Feb 7, 2024
1b71ad6
tweak: get rid of useless check
brusherru Feb 9, 2024
5ae2127
feat: check latest layer available in cloud
brusherru Feb 12, 2024
d070de1
chore: bump & release version to v0.1.1
brusherru Feb 13, 2024
967fe59
feat: bundle sqlite3.dll
brusherru Feb 13, 2024
13ddb75
feat: unpack state.zip despite of hierarchy in archive
brusherru Feb 14, 2024
7f892d8
feat: display error messages in stderr
brusherru Feb 14, 2024
2190d7d
Release v0.1.3
brusherru Feb 14, 2024
4f8ec39
fix: download checksum from correct url
brusherru Feb 14, 2024
53cf403
fix: handle download errors properly
brusherru Feb 14, 2024
f5953ad
chore: rustfmt
brusherru Feb 15, 2024
33d16e6
release v0.1.4
brusherru Feb 15, 2024
afa04c8
fix: handle properly when db is corrupted
brusherru Feb 16, 2024
850f9d4
Release v0.1.5
brusherru Feb 16, 2024
60050ba
refactor: follow recommendations and back up wal file
brusherru Feb 20, 2024
28aafad
Release v0.1.6
brusherru Feb 20, 2024
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
142 changes: 142 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,142 @@
on:
pull_request:
push:
tags:
- 'v*'

name: CI

jobs:
check:
name: Check
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
with:
submodules: true
- uses: dtolnay/rust-toolchain@1.74.1
- uses: Swatinem/rust-cache@v2
- run: cargo check --workspace --all-features

fmt:
name: Rustfmt
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: dtolnay/rust-toolchain@1.74.1
with:
components: rustfmt
- uses: Swatinem/rust-cache@v2
- run: cargo fmt --all -- --check

clippy:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: dtolnay/rust-toolchain@master
with:
components: clippy
toolchain: stable
- uses: Swatinem/rust-cache@v2
- name: Annotate commit with clippy warnings
uses: actions-rs/clippy-check@v1
with:
token: ${{ secrets.GITHUB_TOKEN }}
args: --all-features --workspace

build:
name: Build library
runs-on: ${{ matrix.os }}
needs:
- fmt
- clippy
strategy:
fail-fast: false
matrix:
include:
- os: ubuntu-latest
artifact-name: linux

- os: [self-hosted, linux, arm64]
artifact-name: linux-arm64

- os: [self-hosted, macos, arm64]
artifact-name: macos-m1

- os: macos-latest
artifact-name: macos

- os: windows-2019
artifact-name: windows
steps:
- uses: actions/checkout@v3
- uses: dtolnay/rust-toolchain@1.74.1
- uses: Swatinem/rust-cache@v2
with:
key: ${{ join( matrix.os, '-' ) }}

- name: Version suffix (for release only)
id: version
run: echo "suffix=${{ github.ref_type == 'tag' && '-' || ''}}${{ github.ref_type == 'tag' && github.ref || ''}}" >> $GITHUB_OUTPUT

- name: Install SQLite3 (Linux Arm64)
if: matrix.artifact-name == 'linux-arm64'
run: sudo apt-get install libsqlite3-dev

- name: Install SQLite3 (Windows)
if: matrix.artifact-name == 'windows'
run: |
choco install -y wget
cd C:\
mkdir lib
cd lib
wget https://github.com/buggins/ddbc/raw/master/libs/win64/sqlite3.lib
echo "LIB=C:\lib" >> $env:GITHUB_ENV

- name: Build
run: cargo build --release

- name: Archive artifacts
uses: actions/upload-artifact@v3
with:
name: quicksync-${{ matrix.artifact-name }}${{ steps.version.output.suffix }}
path: |
target/release/quicksync${{ matrix.os == 'windows-2019' && '.exe' || '' }}
if-no-files-found: error

release:
name: Publish release
if: github.event_name == 'push' && github.ref_type == 'tag'
needs: build
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Download artifacts
uses: actions/download-artifact@v3
with:
path: ./artifacts
- name: List artifacts
run: ls -R ./artifacts
- name: Create a draft release
id: create_release
uses: actions/create-release@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
tag_name: ${{ github.ref }}
release_name: ${{ github.ref }}
draft: true
prerelease: false
- name: Pack artifacts
run: >
mkdir ./assets;
for dir in ./artifacts/*/; do
zip -o -j -r "./assets/$(basename "$dir")-$TAG.zip" "$dir";
done
env:
TAG: ${{ github.ref_name }}
- name: Upload Release Assets
run: gh release upload $TAG ./assets/*.zip
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
TAG: ${{ github.ref_name }}
Loading
Loading