-
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
7 changed files
with
132 additions
and
152 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,62 @@ | ||
name: 'Prepare Worker Pipeline' | ||
description: 'Initializes staged build pipeline with job scheduling' | ||
|
||
outputs: | ||
workers: | ||
description: 'colon-separated list of workers used in the specification' | ||
value: ${{ steps.worker.outputs.workers }} | ||
|
||
runs: | ||
using: "composite" | ||
steps: | ||
- name: Check out the repo | ||
uses: actions/checkout@v4 | ||
- name: Prepare environment | ||
shell: bash | ||
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 apt update | ||
DEBIAN_FRONTEND=noninteractive sudo apt install -y software-properties-common retry | ||
sudo retry -d 50,10,30,300 -t 12 add-apt-repository -y ppa:v-launchpad-jochen-sprickerhof-de/ros | ||
sudo apt update | ||
DEBIAN_FRONTEND=noninteractive sudo apt install -y vcstool catkin | ||
- name: Clone sources | ||
shell: bash | ||
run: | | ||
echo 'Importing sources...' | ||
./scripts/import-workspace.sh | ||
- name: Prepare rosdep keys | ||
shell: bash | ||
run: | | ||
cat rosdep.yaml | tee -a 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" "${{ env.DISTRIBUTION }}" "ros-one-$(printf '%s' "$PKG" | tr '_' '-')" | tee -a local.yaml | ||
done | ||
- name: Prepare jobs | ||
shell: bash | ||
id: worker | ||
run: | | ||
# TODO: implement check for currently existing package versions and reduced rebuild | ||
./scripts/generate-jobs.py workspace | tee ${{ env.JOBS_YAML }} | ||
echo "workers=$(cat ${{ env.JOBS_YAML }} | sed -n '/^stage.*:$/ p' | tr -d '\n')" >> $GITHUB_OUTPUT | ||
- name: Store jobs cache | ||
uses: actions/cache/save@v4 | ||
with: | ||
path: ${{ env.JOBS_YAML }} | ||
key: jobs-${{ github.sha }}-${{ github.run_id }}-${{ github.run_attempt }} | ||
- name: Prepare meta data cache | ||
shell: bash | ||
run: | | ||
mkdir -p ${{ env.AGG }} | ||
mv local.yaml ${{ env.AGG }}/local.yaml | ||
cp sources.repos ${{ env.AGG }}/sources_specified.repos | ||
mkdir -p ${{ env.AGG }}/.github/workflows | ||
cp .github/workflows/sync-unstable.yaml ${{ env.AGG }}/.github/workflows/sync-unstable.yaml | ||
- name: Store meta data cache | ||
uses: actions/cache/save@v4 | ||
with: | ||
path: ${{ env.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
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
Oops, something went wrong.