-
Notifications
You must be signed in to change notification settings - Fork 8
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
4 changed files
with
90 additions
and
59 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
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 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,73 @@ | ||
on: | ||
workflow_call: | ||
inputs: | ||
distribution: | ||
type: string | ||
description: "distribution used in rosdep (usually 'debian' or 'ubuntu')" | ||
required: true | ||
# TODO: implement this check | ||
repository-branch: | ||
description: "branch containing the latest debs - used to determine which packages need to be rebuilt" | ||
type: string | ||
default: "" | ||
jobs_yaml: | ||
description: "where to save the jobs yaml" | ||
type: string | ||
required: true | ||
agg: | ||
description: "where are build artifacts aggregated" | ||
type: string | ||
required: true | ||
outputs: | ||
workers: | ||
description: "colon-separated list of workers used in the specification" | ||
value: ${{ jobs.prepare-pipeline.outputs.workers }} | ||
|
||
jobs: | ||
prepare-pipeline: | ||
runs-on: ubuntu-24.04 | ||
outputs: | ||
workers: ${{ steps.worker.outputs.workers }} | ||
steps: | ||
- name: Check out the repo | ||
uses: actions/checkout@v4 | ||
- name: Clone sources | ||
run: | | ||
echo 'Acquire::Retries "20";' | sudo tee -a /etc/apt/apt.conf.d/80-retries | ||
echo 'Acquire::Retries::Delay::Maximum "300";' | sudo tee -a /etc/apt/apt.conf.d/80-retries | ||
echo 'Debug::Acquire::Retries "true";' | sudo tee -a /etc/apt/apt.conf.d/80-retries | ||
sudo add-apt-repository -y ppa:v-launchpad-jochen-sprickerhof-de/ros | ||
sudo apt update | ||
DEBIAN_FRONTEND=noninteractive sudo apt install -y vcstool catkin | ||
mkdir workspace | ||
echo 'Importing sources...' | ||
vcs import -w 5 --recursive --shallow --input sources.repos workspace | ||
- name: Prepare rosdep keys | ||
run: | | ||
cp rosdep.yaml local.yaml | ||
echo >> local.yaml # ensure trailing newline | ||
for PKG in $(catkin_topological_order --only-names workspace); do | ||
printf "%s:\n %s:\n - %s\n" "$PKG" "${{ inputs.distribution }}" "ros-one-$(printf '%s' "$PKG" | tr '_' '-')" | tee -a local.yaml | ||
done | ||
- name: Prepare Jobs | ||
id: worker | ||
run: | | ||
./scripts/generate-jobs.py workspace | tee ${{ inputs.jobs_yaml }} | ||
echo "workers=$(cat ${{ inputs.jobs_yaml }} | sed -n '/^stage.*:$/ p' | tr -d '\n')" >> $GITHUB_OUTPUT | ||
- name: Store jobs cache | ||
uses: actions/cache/save@v4 | ||
with: | ||
path: ${{ inputs.jobs_yaml }} | ||
key: jobs-${{ github.sha }}-${{ github.run_id }}-${{ github.run_attempt }} | ||
- name: Prepare meta data cache | ||
run: | | ||
mkdir -p ${{ inputs.agg }} | ||
mv local.yaml ${{ inputs.agg }}/local.yaml | ||
cp sources.repos ${{ inputs.agg }}/sources_specified.repos | ||
mkdir -p ${{ inputs.agg }}/.github/workflows | ||
cp .github/workflows/sync-unstable.yaml ${{ inputs.agg }}/.github/workflows/sync-unstable.yaml | ||
- name: Store meta data cache | ||
uses: actions/cache/save@v4 | ||
with: | ||
path: ${{ inputs.agg }} | ||
key: apt-repo-stage-1-${{ github.sha }}-${{ github.run_id }}-${{ github.run_attempt }} |
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