forked from onsmith/srt
-
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.
feat: Build and Upload Debian Package
- Loading branch information
Showing
3 changed files
with
63 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,37 @@ | ||
name: Build and Upload Debian Package | ||
|
||
on: | ||
push: | ||
branches: | ||
- master | ||
release: | ||
types: [released] | ||
|
||
jobs: | ||
deb: | ||
runs-on: warp-ubuntu-latest-arm64-4x | ||
steps: | ||
- uses: actions/checkout@v2 | ||
- run: sudo apt update && sudo apt install -y qemu-user-static binfmt-support | ||
- uses: docker/build-push-action@v3 | ||
with: | ||
context: . | ||
outputs: build | ||
- uses: paulhatch/semantic-version@v4 | ||
id: semantic | ||
with: | ||
tag_prefix: "" | ||
format: ${{ github.event_name == 'release' && '${major}.${minor}.${patch}' || '${major}.${minor}.${patch}-prerelease${increment}' }} | ||
- uses: jiro4989/build-deb-action@v2 | ||
id: build | ||
with: | ||
package: irl-libsrt | ||
package_root: ./build | ||
maintainer: IRL Software <[email protected]> | ||
version: ${{ steps.semantic.outputs.version }} | ||
depends: "openssl, libssl-dev" | ||
arch: "arm64" | ||
- uses: actions/upload-artifact@v3 | ||
with: | ||
name: libsrt-arm64.deb | ||
path: ${{ steps.build.outputs.file_name }} |
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 |
---|---|---|
|
@@ -24,6 +24,17 @@ else() | |
project(SRT VERSION ${SRT_VERSION} LANGUAGES C CXX) | ||
endif() | ||
|
||
|
||
set(CPACK_PACKAGE_NAME "irl-libsrt") | ||
set(CPACK_DEBIAN_PACKAGE_ARCHITECTURE "arm64") | ||
set(CPACK_PACKAGE_ARCHITECTURE "arm64") | ||
set(CPACK_PACKAGE_VERSION ${SRT_VERSION}) | ||
set(CPACK_PACKAGE_CONTACT "IRL Software <[email protected]>") | ||
set(CPACK_DEBIAN_PACKAGE_DEPENDS "openssl") | ||
set(CPACK_DEBIAN_FILE_NAME DEB-DEFAULT) | ||
|
||
include(CPack) | ||
|
||
if (NOT ${CMAKE_VERSION} VERSION_LESS "3.28.1") | ||
cmake_policy(SET CMP0054 NEW) | ||
endif () | ||
|
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,15 @@ | ||
FROM --platform=linux/arm64 ubuntu:latest AS build | ||
|
||
ENV DEBIAN_FRONTEND=noninteractive | ||
RUN apt update && apt install cmake make wget xz-utils git build-essential libssl-dev openssl -y | ||
|
||
WORKDIR /libsrt | ||
COPY . . | ||
|
||
RUN mkdir /out | ||
RUN cmake -DCMAKE_INSTALL_PREFIX=/usr ./ | ||
RUN make -j | ||
RUN make DESTDIR=/out install | ||
|
||
FROM scratch AS export | ||
COPY --from=build /out / |