Skip to content

Commit

Permalink
alternate checkout
Browse files Browse the repository at this point in the history
  • Loading branch information
slabajo committed Sep 5, 2024
1 parent 441ed8b commit 38db425
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 30 deletions.
25 changes: 2 additions & 23 deletions .github/workflows/server-buildpackage-rust.child.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ on:
description: "Git repo from where the Rust code is got to build package"
required: false
type: "string"
default: "GStreamer/gst-plugins-rs"
default: "https://github.com/GStreamer/gst-plugins-rs"
jobGitName:
description: "Non-default git branch or tag that should be checked out, if it exists"
required: false
Expand All @@ -39,37 +39,16 @@ jobs:
jobDistro: ${{ fromJson(inputs.jobDistros) }}
timeout-minutes: 30
steps:
- name: "Check for non-default git ref"
id: "git-ref"
run: |
if [[ -n "${{ inputs.jobGitName }}" ]]; then
echo "value=${{ inputs.jobGitName }}" >>$GITHUB_OUTPUT
else
echo "value=main" >>$GITHUB_OUTPUT
fi
- prepare: "Sets temporary directory for repo checkout"
run: |
mkdir tmpRepo
# Action: https://github.com/actions/checkout
- name: "Checkout"
uses: "actions/checkout@ac593985615ec2ede58e132d2e21d2b1cbd6127c" # v3.3.0
working-directory: "tmpRepo/"
with:
repository: "${{ inputs.jobGitRepo }}"
ref: "${{ steps.git-ref.outputs.value }}"

- name: "Configure the environment for ci-scripts/"
run: |
echo "$PWD"/ci-scripts >>$GITHUB_PATH
echo "KURENTO_SCRIPTS_HOME=$PWD"/ci-scripts >>$GITHUB_ENV
echo "GSTREAMER_RUST_PATCH_DIR=$PWD/server/gst-plugins-rs" >>$GITHUB_ENV
echo "JOB_DIR=$PWD/tmpRepo" >>$GITHUB_ENV
echo "JOB_TIMESTAMP=$(date --utc +%Y%m%d%H%M%S)" >>$GITHUB_ENV
- name: "Run job script"
env:
JOB_REPO: "${{ inputs.jobGitRepo }}"
JOB_DISTRO: "${{ matrix.jobDistro }}"
JOB_RELEASE: "${{ inputs.jobRelease }}"
DISABLE_APT_PROXY: "true"
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/server.parent.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@ jobs:
uses: "./.github/workflows/server-buildpackage-rust.child.yaml"
with:
jobDistros: "${{ inputs.jobDistros }}"
jobGitRepo: "GStreamer/gst-plugins-rs"
jobGitRepo: "https://github.com/GStreamer/gst-plugins-rs"
jobGitName: "gstreamer-1.24.2"
jobRelease: ${{ inputs.jobRelease }}
runnerGroup: ${{ inputs.runnerGroup }}
Expand Down
14 changes: 8 additions & 6 deletions ci-scripts/ci_job_package_gst_rust_debian.sh
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,10 @@
#/
#/ Numeric timestamp shown in the version of nightly packages.
#/
#/ JOB_GIT_REPO
#/
#/ Git REpository containing the rust project to build package
#/
#/ JOB_GIT_NAME
#/
#/ Git branch or tag that should be checked out, if it exists.
Expand All @@ -44,11 +48,6 @@
#/
#/ Path to the diffs to apply to gstreamer rust
#/
#/ JOB_DIR
#/
#/ Path to the rust repository
#/
#/
#/ * Variable(s) from job Multi-Configuration ("Matrix") Project axis:
#/
#/ JOB_DISTRO
Expand Down Expand Up @@ -87,7 +86,10 @@ set -o xtrace
GST_RUST_PACKAGE="gst-plugin-rtp"

# Apply diff to generate deb package
cd $JOB_DIR
mkdir tmpRepo
cd tmpRepo
git clone $JOB_GIT_REPO
cd *
git apply "$GSTREAMER_RUST_PATCH_DIR"/debian.diff


Expand Down

0 comments on commit 38db425

Please sign in to comment.