-
Notifications
You must be signed in to change notification settings - Fork 71
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Update deb package #2226
Open
tino097
wants to merge
4
commits into
jqnatividad:master
Choose a base branch
from
tino097:update-deb-package
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
+86
−33
Open
Update deb package #2226
Changes from all commits
Commits
Show all changes
4 commits
Select commit
Hold shift + click to select a range
1f81ea2
Debian package will contain qsv, qsvdp, qsvlite
tino097 5bb9d5f
Merge remote-tracking branch 'upstream/master' into update-deb-package
tino097 eb9edf3
Create multiple deb packages
tino097 74b1f59
Use release publish to trigger debian package build
tino097 File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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 |
---|---|---|
@@ -1,55 +1,73 @@ | ||
name: Publish Debian Package | ||
|
||
on: | ||
workflow_dispatch: | ||
release: | ||
types: [published] | ||
|
||
env: | ||
QSV_KIND: prebuilt | ||
|
||
jobs: | ||
analyze-tags: | ||
build-and-publish: | ||
runs-on: ubuntu-22.04 | ||
outputs: | ||
previous-tag: ${{ steps.previoustag.outputs.tag }} | ||
steps: | ||
- uses: actions/checkout@v4 | ||
with: | ||
fetch-depth: 0 | ||
- name: Get previous tag | ||
id: previoustag | ||
uses: "WyriHaximus/github-action-get-previous-tag@v1" | ||
- name: Checkout repository | ||
uses: actions/checkout@v4 | ||
|
||
build: | ||
needs: analyze-tags | ||
runs-on: ubuntu-22.04 | ||
steps: | ||
- name: Installing Rust toolchain | ||
- name: Install Rust toolchain | ||
uses: actions-rs/toolchain@v1 | ||
with: | ||
toolchain: stable | ||
profile: minimal | ||
target: x86_64-unknown-linux-gnu | ||
override: true | ||
|
||
- name: Checkout repository | ||
uses: actions/checkout@v4 | ||
with: | ||
ref: ${{ needs.analyze-tags.outputs.previous-tag }} | ||
|
||
- name: apt-get update Ubuntu, libwayland-dev | ||
- name: Install dependencies | ||
run: | | ||
sudo apt-get update | ||
sudo apt-get install libwayland-dev | ||
sudo apt-get install -y libwayland-dev | ||
cargo install cargo-deb | ||
|
||
- name: Install Cargo Deb | ||
run: cargo install cargo-deb | ||
- name: Build all Debian packages | ||
id: build | ||
run: | | ||
chmod +x scripts/build-deb.sh | ||
echo "Running build-deb.sh..." | ||
build_output=$(./scripts/build-deb.sh) | ||
echo "Build script output:" | ||
echo "$build_output" | ||
|
||
# Extract paths from the output | ||
deb_paths=$(echo "$build_output" | grep -oP '/[^ ]*\.deb' | tr '\n' ' ') | ||
|
||
echo "Extracted .deb paths:" | ||
echo "$deb_paths" | ||
|
||
echo "DEB_PATHS=$deb_paths" >> $GITHUB_OUTPUT | ||
|
||
- name: Build Debian Package | ||
run: cargo deb --target=x86_64-unknown-linux-gnu | ||
- name: List built packages | ||
run: | | ||
echo "Built packages:" | ||
ls -l ${{ steps.build.outputs.DEB_PATHS }} | ||
|
||
- name: Upload Debian Package | ||
- name: Rename and move Debian packages | ||
run: | | ||
mkdir -p renamed_debs | ||
mv $(echo "${{ steps.build.outputs.DEB_PATHS }}" | awk '{print $1}') renamed_debs/qsv.deb | ||
mv $(echo "${{ steps.build.outputs.DEB_PATHS }}" | awk '{print $2}') renamed_debs/qsvlite.deb | ||
mv $(echo "${{ steps.build.outputs.DEB_PATHS }}" | awk '{print $3}') renamed_debs/qsvdp.deb | ||
echo "Renamed packages:" | ||
ls -l renamed_debs | ||
|
||
- name: Upload Debian Packages as Artifacts | ||
uses: actions/upload-artifact@v3 | ||
with: | ||
name: qsv-deb | ||
path: target/x86_64-unknown-linux-gnu/debian/*.deb | ||
name: debian-packages | ||
path: renamed_debs/*.deb | ||
|
||
- name: Upload Debian Packages as Artifacts | ||
uses: actions/upload-artifact@v3 | ||
with: | ||
name: debian-packages | ||
path: | | ||
/home/runner/work/qsv/qsv/target/debian/*.deb |
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
This file was deleted.
Oops, something went wrong.
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,20 @@ | ||
#!/bin/bash | ||
|
||
build_variant() { | ||
local variant=$1 | ||
local output_dir="target/debian" | ||
|
||
echo "Building ${variant} package..." | ||
if [ "$variant" = "default" ]; then | ||
cargo deb | ||
else | ||
cargo deb --variant=$variant | ||
fi | ||
|
||
} | ||
|
||
default_path=$(build_variant "default") | ||
lite_path=$(build_variant "lite") | ||
datapusher_plus_path=$(build_variant "datapusher_plus") | ||
|
||
echo "DEB_PATHS=${default_path} ${lite_path} ${datapusher_plus_path}" |
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You may want to add the features you actually want to enable. Otherwise, this is just like qsvlite.
I suggest to add everything EXCEPT python, as doing so creates a runtime dependency on the specific version of python libraries being present at startup, even if you're not using the
py
command:["feature_capable","apply","fetch","foreach","geocode","lens","luau","polars","prompt","to"]
You can also enable the
python
feature if you can specify cargo-deb to have a dependency on the specific version of python you need to be installed in the config.