Skip to content

Commit

Permalink
Change cbuild to cinstall
Browse files Browse the repository at this point in the history
  • Loading branch information
fdintino authored and lu-zero committed Apr 19, 2023
1 parent 995fef0 commit 961e541
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 12 deletions.
16 changes: 5 additions & 11 deletions .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -246,7 +246,7 @@ jobs:
env:
# We get around cross's lack of support for third-party subcommands by
# defining a custom Dockerfile whose entrypoint rewrites the
# "cargo build" command to "cargo cbuild"
# "cargo build" command to "cargo cinstall"
CROSS_BUILD_DOCKERFILE: ./cross/Dockerfile.libs
CARGO_TARGET_I686_UNKNOWN_LINUX_MUSL_RUSTFLAGS:
"-C target-feature=-crt-static"
Expand All @@ -268,7 +268,8 @@ jobs:
RUSTFLAGS:
"-C target-feature=-crt-static -C target-cpu=${{ matrix.target_cpu }}"
run: |
cargo cbuild --target ${{ matrix.target }} \
cargo cinstall --target ${{ matrix.target }} \
--prefix dist \
--library-type staticlib \
--library-type cdylib \
--profile release-strip
Expand Down Expand Up @@ -305,10 +306,6 @@ jobs:
startsWith(github.ref, 'refs/tags/v') ||
github.event_name == 'schedule')
run: |
mkdir -p dist/{include/rav1e,lib/pkgconfig}
cp target/${{ matrix.target }}/release-strip/rav1e.h dist/include/rav1e/
cp target/${{ matrix.target }}/release-strip/librav1e.{a,so} dist/lib/
cp target/${{ matrix.target }}/release-strip/rav1e.pc dist/lib/pkgconfig
cd dist
tar -czvf $GITHUB_WORKSPACE/$ARTIFACT_FILE *
Expand Down Expand Up @@ -375,7 +372,8 @@ jobs:
- name: Build librav1e
if: matrix.build == 'sdk'
run: |
cargo cbuild --target ${{ matrix.target }} \
cargo cinstall --target ${{ matrix.target }} \
--prefix dist \
--library-type staticlib \
--library-type cdylib \
--profile release-strip
Expand Down Expand Up @@ -412,10 +410,6 @@ jobs:
startsWith(github.ref, 'refs/tags/v') ||
github.event_name == 'schedule')
run: |
mkdir -p dist/{include/rav1e,lib/pkgconfig}
cp target/${{ matrix.target }}/release-strip/rav1e.h dist/include/rav1e/
cp target/${{ matrix.target }}/release-strip/librav1e.{a,dylib} dist/lib/
cp target/${{ matrix.target }}/release-strip/rav1e.pc dist/lib/pkgconfig
cd dist
tar -czvf $GITHUB_WORKSPACE/$ARTIFACT_FILE *
Expand Down
2 changes: 1 addition & 1 deletion cross/entrypoint-build-libs.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

for arg in "$@"; do
arg=$(echo $arg | perl -pne \
's/(?:(?<=\s)|^)build(?=\s)/cbuild --library-type staticlib --library-type cdylib/')
's/(?:(?<=\s)|^)build(?=\s)/cinstall --library-type staticlib --library-type cdylib --prefix dist/')
set -- "$@" "$arg"
shift
done
Expand Down

0 comments on commit 961e541

Please sign in to comment.