Skip to content

Commit

Permalink
Merge pull request #2 from databento/dev
Browse files Browse the repository at this point in the history
VER: Release 0.2.0
  • Loading branch information
threecgreen authored Nov 29, 2022
2 parents 19fe194 + 48995d2 commit a76070d
Show file tree
Hide file tree
Showing 25 changed files with 1,362 additions and 493 deletions.
23 changes: 9 additions & 14 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,31 +4,23 @@ name: build

on:
push:
branches: [ main, dev ]
branches: [main, dev]

jobs:
build:
strategy:
fail-fast: false
matrix:
arch: [ x64, ARM64 ]
os: [ ubuntu-latest, macos-latest, windows-latest ]
python-version: [ "3.7", "3.8", "3.9", "3.10" ]
arch: [x64, ARM64]
os: [ubuntu-latest, macos-latest, windows-latest]
python-version: ["3.7", "3.8", "3.9", "3.10"]
name: build - Python ${{ matrix.python-version }} (${{ matrix.arch }} ${{ matrix.os }})
runs-on: ${{ matrix.os }}

steps:
- name: Checkout repository
uses: actions/checkout@v3

# Rust setup
- name: Set up Rust environment
uses: actions-rs/toolchain@v1
with:
toolchain: stable
override: true
components: rustfmt, clippy

# Cargo setup
- name: Set up Cargo cache
uses: actions/cache@v3
Expand All @@ -41,7 +33,7 @@ jobs:

# Python setup
- name: Set up Python environment
uses: actions/setup-python@v2
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}

Expand All @@ -57,4 +49,7 @@ jobs:
# Run tests
- name: Run tests
run: cargo test --all-features
run: |
cargo test
cd src/dbz-lib
cargo test --features python-test
105 changes: 40 additions & 65 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ on:
workflow_run:
workflows:
- build
branches: [ main ]
branches: [main]
types:
- completed

Expand All @@ -24,14 +24,6 @@ jobs:
with:
fetch-depth: 2

# Rust setup
- name: Set up Rust environment
uses: actions-rs/toolchain@v1
with:
toolchain: stable
override: true
components: rustfmt, clippy

# Cargo setup
- name: Set up Cargo cache
uses: actions/cache@v3
Expand All @@ -44,7 +36,7 @@ jobs:

# Python setup
- name: Set up Python environment
uses: actions/setup-python@v2
uses: actions/setup-python@v4
with:
python-version: "3.10"

Expand All @@ -66,14 +58,14 @@ jobs:
- name: Create git tag
uses: salsify/action-detect-and-tag-new-version@v2
with:
version-command: grep -E '^version =' src/dbz-python/Cargo.toml | cut -d'"' -f 2
version-command: scripts/get_version.sh

# Set release output variables
- name: Set output
id: vars
run: |
echo "::set-output name=tag_name::v$(grep -E '^version =' src/dbz-python/Cargo.toml | cut -d'"' -f 2)"
echo "::set-output name=release_name::$(grep -E '^version =' src/dbz-python/Cargo.toml | cut -d'"' -f 2)"
echo "::set-output name=tag_name::v$(scripts/get_version.sh)"
echo "::set-output name=release_name::$(scripts/get_version.sh)"
# Create GitHub release
- name: Create release
Expand All @@ -90,24 +82,16 @@ jobs:
prerelease: false

macos-release:
needs: [ tag-release ]
needs: [tag-release]
strategy:
fail-fast: false
matrix:
python-version: [ "3.7", "3.8", "3.9", "3.10" ]
python-version: ["3.7", "3.8", "3.9", "3.10"]
runs-on: macos-latest
steps:
- name: Checkout repository
uses: actions/checkout@v3

# Rust setup
- name: Set up Rust environment
uses: actions-rs/toolchain@v1
with:
toolchain: stable
override: true
components: rustfmt, clippy

# Cargo setup
- name: Set up Cargo cache
uses: actions/cache@v3
Expand All @@ -120,7 +104,7 @@ jobs:

# Python setup
- name: Set up Python environment
uses: actions/setup-python@v2
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}
architecture: x64
Expand All @@ -137,30 +121,22 @@ jobs:
args: --release --universal2 --out dist --manifest-path src/dbz-python/Cargo.toml --interpreter python${{ matrix.python-version }}

- name: Upload wheels
uses: actions/upload-artifact@v2
uses: actions/upload-artifact@v3
with:
name: wheels
path: dist

windows-release:
needs: [ tag-release ]
needs: [tag-release]
strategy:
fail-fast: false
matrix:
python-version: [ "3.7", "3.8", "3.9", "3.10" ]
python-version: ["3.7", "3.8", "3.9", "3.10"]
runs-on: windows-latest
steps:
- name: Checkout repository
uses: actions/checkout@v3

# Rust setup
- name: Set up Rust environment
uses: actions-rs/toolchain@v1
with:
toolchain: stable
override: true
components: rustfmt, clippy

# Cargo setup
- name: Set up Cargo cache
uses: actions/cache@v3
Expand All @@ -173,7 +149,7 @@ jobs:

# Python setup
- name: Set up Python environment
uses: actions/setup-python@v2
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}
architecture: x64
Expand All @@ -185,31 +161,23 @@ jobs:
args: --release --out dist --manifest-path src/dbz-python/Cargo.toml --interpreter python${{ matrix.python-version }}

- name: Upload wheels
uses: actions/upload-artifact@v2
uses: actions/upload-artifact@v3
with:
name: wheels
path: dist

linux-release:
needs: [ tag-release ]
needs: [tag-release]
strategy:
fail-fast: false
matrix:
python-version: [ "3.7", "3.8", "3.9", "3.10" ]
target: [ x86_64, aarch64 ]
python-version: ["3.7", "3.8", "3.9", "3.10"]
target: [x86_64, aarch64]
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v3

# Rust setup
- name: Set up Rust environment
uses: actions-rs/toolchain@v1
with:
toolchain: stable
override: true
components: rustfmt, clippy

# Cargo setup
- name: Set up Cargo cache
uses: actions/cache@v3
Expand All @@ -222,7 +190,7 @@ jobs:

# Python setup
- name: Set up Python environment
uses: actions/setup-python@v2
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}

Expand All @@ -234,31 +202,23 @@ jobs:
args: --release --out dist --manifest-path src/dbz-python/Cargo.toml --interpreter python${{ matrix.python-version }}

- name: Upload wheels
uses: actions/upload-artifact@v2
uses: actions/upload-artifact@v3
with:
name: wheels
path: dist

linux-musl-release:
needs: [ tag-release ]
needs: [tag-release]
strategy:
fail-fast: false
matrix:
python-version: [ "3.7", "3.8", "3.9", "3.10" ]
target: [ x86_64-unknown-linux-musl, aarch64-unknown-linux-musl ]
python-version: ["3.7", "3.8", "3.9", "3.10"]
target: [x86_64-unknown-linux-musl, aarch64-unknown-linux-musl]
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v3

# Rust setup
- name: Set up Rust environment
uses: actions-rs/toolchain@v1
with:
toolchain: stable
override: true
components: rustfmt, clippy

# Cargo setup
- name: Set up Cargo cache
uses: actions/cache@v3
Expand All @@ -271,7 +231,7 @@ jobs:

# Python setup
- name: Set up Python environment
uses: actions/setup-python@v2
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}

Expand All @@ -283,16 +243,23 @@ jobs:
args: --release --out dist --manifest-path src/dbz-python/Cargo.toml --interpreter python${{ matrix.python-version }}

- name: Upload wheels
uses: actions/upload-artifact@v2
uses: actions/upload-artifact@v3
with:
name: wheels
path: dist

publish:
runs-on: ubuntu-latest
needs: [ macos-release, windows-release, linux-release, linux-musl-release ]
needs:
[
tag-release,
macos-release,
windows-release,
linux-release,
linux-musl-release,
]
steps:
- uses: actions/download-artifact@v2
- uses: actions/download-artifact@v3
with:
name: wheels
# Install publish dependencies
Expand All @@ -304,3 +271,11 @@ jobs:
TWINE_USERNAME: ${{ secrets.TWINE_USERNAME }}
TWINE_PASSWORD: ${{ secrets.TWINE_PASSWORD }}
run: twine upload *
- name: Upload to release
uses: actions/upload-artifact@v3
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
name: wheels
path: "*"
upload_url: ${{ needs.tag-release.outputs.upload_url }}
11 changes: 11 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
# Changelog

## 0.2.0 - TBD
- Change JSON output to NDJSON
- Quote nanosecond timestamps in JSON to avoid loss of precision when parsing
- Change DBZ decoding to use [streaming-iterator](https://crates.io/crates/streaming-iterator)
- Enable Zstd checksums
- Add interface for writing DBZ files

## 0.1.5 - 2022-09-14
- Initial release
Loading

0 comments on commit a76070d

Please sign in to comment.