Skip to content

Commit

Permalink
Add C lib Windows artifact to release workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
quietvoid committed Apr 25, 2022
1 parent 43d8fe4 commit 3c68cbf
Showing 1 changed file with 17 additions and 0 deletions.
17 changes: 17 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@ jobs:
shell: bash
run: |
echo "RELEASE_PKG_VERSION=$(cargo pkgid | cut -d# -f2 | cut -d: -f2)" >> $GITHUB_ENV
echo "LIBDOVI_PKG_VERSION=$(cargo pkgid --manifest-path dolby_vision/Cargo.toml | cut -d# -f2 | cut -d: -f2)" >> $GITHUB_ENV
- name: Install musl-tools (Linux)
if: matrix.build == 'Linux'
Expand All @@ -59,6 +60,19 @@ jobs:
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: Build C lib (Windows)
if: matrix.build == 'Windows'
run: |
cargo cbuild --manifest-path dolby_vision/Cargo.toml --release
- name: Create artifact directory
run: |
mkdir ${{ env.RELEASE_DIR }}
Expand All @@ -77,6 +91,9 @@ jobs:
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
mv ./target/${{ env.WINDOWS_TARGET }}/release/dovi.dll .
7z a ./${{ env.RELEASE_DIR }}/libdovi-${{ env.LIBDOVI_PKG_VERSION }}-${{ env.WINDOWS_TARGET }}.zip ./dovi.dll
- name: Create zipfile (macOS)
if: matrix.build == 'macOS'
run: |
Expand Down

0 comments on commit 3c68cbf

Please sign in to comment.