-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
0 parents
commit af058ed
Showing
39 changed files
with
4,303 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
name: CI | ||
|
||
on: | ||
push: | ||
branches: [ master ] | ||
pull_request: | ||
branches: [ master ] | ||
|
||
jobs: | ||
ci: | ||
name: Check, test, rustfmt and clippy | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v3 | ||
|
||
- name: Install Rust, clippy and rustfmt | ||
uses: dtolnay/rust-toolchain@stable | ||
with: | ||
components: clippy, rustfmt | ||
|
||
- name: Check | ||
run: | | ||
cargo check --workspace --all-features | ||
# TODO: Test | ||
# - name: Test | ||
# run: | | ||
# cargo test --workspace --all-features | ||
|
||
- name: Rustfmt | ||
run: | | ||
cargo fmt --all --check | ||
- name: Clippy | ||
run: | | ||
cargo clippy --workspace --all-features --all-targets --tests -- --deny warnings --verbose |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,96 @@ | ||
on: | ||
workflow_dispatch: | ||
|
||
name: Artifacts | ||
|
||
env: | ||
RELEASE_BIN: dovi_meta | ||
RELEASE_DIR: artifacts | ||
WINDOWS_TARGET: x86_64-pc-windows-msvc | ||
MACOS_TARGET: x86_64-apple-darwin | ||
LINUX_TARGET: x86_64-unknown-linux-musl | ||
|
||
jobs: | ||
build: | ||
name: Build artifacts | ||
runs-on: ${{ matrix.os }} | ||
strategy: | ||
matrix: | ||
build: [Linux, macOS, Windows] | ||
include: | ||
- build: Linux | ||
os: ubuntu-latest | ||
- build: macOS | ||
os: macos-latest | ||
- build: Windows | ||
os: windows-latest | ||
|
||
steps: | ||
- uses: actions/checkout@v3 | ||
|
||
- name: Install Rust | ||
uses: dtolnay/rust-toolchain@stable | ||
|
||
- name: Get the version | ||
shell: bash | ||
run: | | ||
echo "RELEASE_PKG_VERSION=$(cargo pkgid | cut -d# -f2 | cut -d: -f2)" >> $GITHUB_ENV | ||
- name: Install musl-tools (Linux) | ||
if: matrix.build == 'Linux' | ||
run: | | ||
sudo apt-get update -y | ||
sudo apt-get install musl-tools -y | ||
- name: Build (Linux) | ||
if: matrix.build == 'Linux' | ||
run: | | ||
rustup target add ${{ env.LINUX_TARGET }} | ||
cargo build --release --target ${{ env.LINUX_TARGET }} | ||
- name: Build (macOS) | ||
if: matrix.build == 'macOS' | ||
run: cargo build --release | ||
|
||
- name: Build (Windows) | ||
if: matrix.build == 'Windows' | ||
run: cargo build --release | ||
|
||
- name: Install cargo-c (Windows) | ||
if: matrix.build == 'Windows' | ||
run: | | ||
$LINK = "https://github.com/lu-zero/cargo-c/releases/latest/download" | ||
$CARGO_C_FILE = "cargo-c-windows-msvc" | ||
curl -LO "$LINK/$CARGO_C_FILE.zip" | ||
7z e -y "$CARGO_C_FILE.zip" -o"${env:USERPROFILE}\.cargo\bin" | ||
- name: Create artifact directory | ||
run: | | ||
mkdir ${{ env.RELEASE_DIR }} | ||
- name: Create tarball (Linux) | ||
if: matrix.build == 'Linux' | ||
run: | | ||
strip ./target/${{ env.LINUX_TARGET }}/release/${{ env.RELEASE_BIN }} | ||
mv ./target/${{ env.LINUX_TARGET }}/release/${{ env.RELEASE_BIN }} ./${{ env.RELEASE_BIN }} | ||
tar -cvzf ./${{ env.RELEASE_DIR }}/${{ env.RELEASE_BIN }}-${{ env.RELEASE_PKG_VERSION }}-${{ env.LINUX_TARGET }}.tar.gz ./${{ env.RELEASE_BIN }} | ||
- name: Create zipfile (Windows) | ||
if: matrix.build == 'Windows' | ||
shell: bash | ||
run: | | ||
mv ./target/release/${{ env.RELEASE_BIN }}.exe ./${{ env.RELEASE_BIN }}.exe | ||
7z a ./${{ env.RELEASE_DIR }}/${{ env.RELEASE_BIN }}-${{ env.RELEASE_PKG_VERSION }}-${{ env.WINDOWS_TARGET }}.zip ./${{ env.RELEASE_BIN }}.exe | ||
- name: Create zipfile (macOS) | ||
if: matrix.build == 'macOS' | ||
run: | | ||
strip ./target/release/${{ env.RELEASE_BIN }} | ||
mv ./target/release/${{ env.RELEASE_BIN }} ./${{ env.RELEASE_BIN }} | ||
zip -9 ./${{ env.RELEASE_DIR }}/${{ env.RELEASE_BIN }}-${{ env.RELEASE_PKG_VERSION }}-${{ env.MACOS_TARGET }}.zip ./${{ env.RELEASE_BIN }} | ||
- name: Upload Zip | ||
uses: actions/upload-artifact@v1 | ||
with: | ||
name: ${{ matrix.build }} | ||
path: ./${{ env.RELEASE_DIR }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
/target |
Oops, something went wrong.