Skip to content

Commit

Permalink
added build record tool
Browse files Browse the repository at this point in the history
  • Loading branch information
giangndm committed Jul 12, 2024
1 parent c5a3764 commit a542900
Show file tree
Hide file tree
Showing 2 changed files with 23 additions and 4 deletions.
25 changes: 22 additions & 3 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ concurrency:

env:
APP_NAME: atm0s-media-server
RECORD_TOOL: atm0s-media-record
ARTIFACT_DIR: release-builds
REGISTRY: ghcr.io
IMAGE_NAME: ${{ github.repository }}
Expand Down Expand Up @@ -90,6 +91,7 @@ jobs:
target: x86_64-unknown-linux-gnu
extension: ""
cross: false
build_record_tool: true
- build: linux musl x64
os: ubuntu-latest
rust: stable
Expand All @@ -102,6 +104,7 @@ jobs:
target: aarch64-unknown-linux-gnu
extension: ""
cross: true
build_record_tool: true
- build: linux musl aarch64
os: ubuntu-latest
rust: stable
Expand Down Expand Up @@ -156,12 +159,14 @@ jobs:
target: x86_64-apple-darwin
extension: ""
cross: false
build_record_tool: true
- build: macos aarch64
os: macos-latest
rust: stable
target: aarch64-apple-darwin
extension: ""
cross: true
build_record_tool: true
# - build: windows gnu x64
# os: ubuntu-latest
# rust: stable
Expand Down Expand Up @@ -201,16 +206,30 @@ jobs:
run: |
mv ./.cargo/config.toml.release-build .cargo/config.toml
- name: Build
- name: Build server
uses: actions-rs/cargo@v1
with:
use-cross: ${{ matrix.cross }}
command: build
args: --verbose --release --package ${{ env.APP_NAME }} --target ${{ matrix.target }} --features embed_static

- name: Rename file
- name: Build record tool
if: matrix.build_record_tool
uses: actions-rs/cargo@v1
with:
use-cross: ${{ matrix.cross }}
command: build
args: --verbose --release --package ${{ env.RECORD_CONVERT }} --target ${{ matrix.target }} --bin convert_webm

- name: Rename server
if: ${{ matrix.build != 'windows gnu x64' && matrix.build != 'windows msvc x64' }}
run: mv ./target/${{ matrix.target }}/release/${{ env.APP_NAME }}${{ matrix.extension }} ${{ env.APP_NAME }}-${{ matrix.target }}${{ matrix.extension }}
run: |
mv ./target/${{ matrix.target }}/release/${{ env.APP_NAME }}${{ matrix.extension }} ${{ env.APP_NAME }}-${{ matrix.target }}${{ matrix.extension }}
- name: Rename record
if: matrix.build_record_tool && ${{ matrix.build != 'windows gnu x64' && matrix.build != 'windows msvc x64' }}
run: |
mv ./target/${{ matrix.target }}/release/convert_webm${{ matrix.extension }} convert_webm-${{ matrix.target }}${{ matrix.extension }}
- name: Upload Artifact to Summary
if: ${{ matrix.build != 'windows gnu x64' && matrix.build != 'windows msvc x64' }}
Expand Down
2 changes: 1 addition & 1 deletion packages/media_record/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ serde = { version = "1.0", features = ["derive"], optional = true }

[features]
default = ["convert_webm"]
convert_webm = ["tokio/full", "tracing-subscriber", "rtp", "clap", "serde"]
convert_webm = ["tokio/full", "tracing-subscriber", "webm", "rtp", "clap", "serde"]

[dev-dependencies]
tokio = { version = "1", features = ["full"] }
Expand Down

0 comments on commit a542900

Please sign in to comment.