Skip to content

Commit 4cb61cf

Browse files
committed
Initial release
0 parents  commit 4cb61cf

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

46 files changed

+8879
-0
lines changed

.github/workflows/build.yml

+42
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
1+
name: Build
2+
3+
on:
4+
push:
5+
branches:
6+
- '*'
7+
pull_request:
8+
branches:
9+
- master
10+
11+
env:
12+
CARGO_TERM_COLOR: always
13+
14+
jobs:
15+
build:
16+
strategy:
17+
matrix:
18+
versions:
19+
- stable
20+
- '1.81.0' # MSRV
21+
runs-on: ubuntu-latest
22+
steps:
23+
- uses: actions/checkout@v4
24+
- uses: dtolnay/rust-toolchain@master
25+
with:
26+
toolchain: ${{ matrix.versions }}
27+
components: rustfmt, clippy
28+
- uses: Swatinem/rust-cache@v2
29+
- name: Version
30+
run: |
31+
rustc --version
32+
cargo --version
33+
cargo fmt -- --version
34+
cargo clippy -- --version
35+
- name: Format
36+
run: cargo fmt --all -- --check
37+
- name: Build
38+
run: cargo build --verbose
39+
- name: Lint
40+
run: cargo clippy --all-targets --all-features -- -D warnings
41+
- name: Run tests
42+
run: cargo test --verbose

.github/workflows/release.yml

+74
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,74 @@
1+
name: Release
2+
3+
on:
4+
push:
5+
tags:
6+
- 'v*'
7+
8+
env:
9+
CARGO_TERM_COLOR: always
10+
11+
jobs:
12+
build:
13+
strategy:
14+
matrix:
15+
targets:
16+
- target: x86_64-unknown-linux-gnu
17+
os: ubuntu-latest
18+
- target: x86_64-unknown-linux-musl
19+
os: ubuntu-latest
20+
- target: aarch64-unknown-linux-gnu
21+
os: ubuntu-latest
22+
- target: aarch64-unknown-linux-musl
23+
os: ubuntu-latest
24+
- target: x86_64-apple-darwin
25+
os: macos-14
26+
- target: aarch64-apple-darwin
27+
os: macos-14
28+
runs-on: ${{ matrix.targets.os }}
29+
steps:
30+
- name: Checkout
31+
uses: actions/checkout@v4
32+
- name: Setup
33+
run: rustup target add ${{ matrix.targets.target }}
34+
- name: Build
35+
uses: houseabsolute/[email protected]
36+
with:
37+
command: build
38+
target: ${{ matrix.targets.target }}
39+
args: "--release"
40+
- name: Set release version
41+
run: echo "RELEASE_VERSION=${GITHUB_REF_NAME#v}" >> ${GITHUB_ENV}
42+
- name: Archive
43+
run: tar -czf ddv-${{ env.RELEASE_VERSION }}-${{ matrix.targets.target }}.tar.gz -C target/${{ matrix.targets.target }}/release ddv
44+
- name: Checksum
45+
run: shasum -a 256 ddv-${{ env.RELEASE_VERSION }}-${{ matrix.targets.target }}.tar.gz
46+
- name: Upload artifact
47+
uses: actions/upload-artifact@v4
48+
with:
49+
name: release-${{ matrix.targets.target }}
50+
path: ddv-${{ env.RELEASE_VERSION }}-${{ matrix.targets.target }}.tar.gz
51+
if-no-files-found: error
52+
release:
53+
permissions:
54+
contents: write
55+
runs-on: ubuntu-latest
56+
needs: build
57+
steps:
58+
- name: Download artifact
59+
uses: actions/download-artifact@v4
60+
with:
61+
path: releases
62+
pattern: release-*
63+
merge-multiple: true
64+
- name: Checksum
65+
run: sha256sum releases/* > ./releases/checksum.txt
66+
- name: Create Draft Release
67+
uses: softprops/[email protected]
68+
with:
69+
draft: true
70+
generate_release_notes: true
71+
make_latest: true
72+
files: |
73+
releases/*
74+

.gitignore

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
/target

0 commit comments

Comments
 (0)