mirror of
https://github.com/lopsided98/nix-ros-overlay.git
synced 2025-06-09 17:42:22 +03:00

Some checks failed
Build / build (humble, aarch64-linux) (push) Has been cancelled
Build / build (humble, x86_64-linux) (push) Has been cancelled
Build / build (jazzy, aarch64-linux) (push) Has been cancelled
Build / build (jazzy, x86_64-linux) (push) Has been cancelled
Build / build (noetic, aarch64-linux) (push) Has been cancelled
Build / build (noetic, x86_64-linux) (push) Has been cancelled
Build / build (rolling, aarch64-linux) (push) Has been cancelled
Build / build (rolling, x86_64-linux) (push) Has been cancelled
The update workflow is updated as follows: Instead of running just superflore, we run: 1. superflore --dry-run ... 2. maintainers/scripts/update-ament-vendor.sh && git commit 3. superflore --pr-only ... The first command updates the overlay as before, but does not submit a PR. The second step updates ament_vendor metadata according to the updated overlay and the third command creates the PR with all updates. I tried to make the step 2 as fast and efficient as possible, but it may happen that it will run for long time (about 1 hour in my testing). The reason is that, for example, if gz-msgs-vendor package gets updated, the update of other vendored packages depending on it, e.g., gz-sim-vendor, will have to build the updated gz-msgs-vendor, because it is not yet in the cachix cache.
60 lines
2.4 KiB
YAML
60 lines
2.4 KiB
YAML
name: Update overlay using Superflore
|
|
on:
|
|
schedule:
|
|
- cron: "0 12 * * FRI"
|
|
workflow_dispatch:
|
|
jobs:
|
|
build:
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- uses: actions/checkout@v3
|
|
with:
|
|
ref: develop
|
|
- uses: cachix/install-nix-action@v22
|
|
- uses: cachix/cachix-action@v12
|
|
with:
|
|
name: ros
|
|
signingKey: '${{ secrets.CACHIX_SIGNING_KEY }}'
|
|
- name: Install Superflore
|
|
run: |
|
|
nix-env -f . -iA python3Packages.rosdep superflore
|
|
- name: Update overlay
|
|
env:
|
|
ROS_OS_OVERRIDE: nixos
|
|
ROSDEP_SOURCE_PATH: rosdep-sources
|
|
run: |
|
|
mkdir -p "$ROSDEP_SOURCE_PATH"
|
|
curl https://raw.githubusercontent.com/ros/rosdistro/master/rosdep/sources.list.d/20-default.list -o "$ROSDEP_SOURCE_PATH/20-default.list"
|
|
rosdep update
|
|
git config --local user.email "superflore@github.com"
|
|
git config --local user.name "Superflore"
|
|
git config credential.helper '!
|
|
f() {
|
|
echo "username=lopsided98"
|
|
echo "password=${SUPERFLORE_GITHUB_TOKEN}"
|
|
}; f'
|
|
superflore-gen-nix --dry-run \
|
|
--tar-archive-dir "${{ runner.temp }}/tar" \
|
|
--output-repository-path . \
|
|
--upstream-branch develop \
|
|
--all
|
|
- name: Update ament_vendor info
|
|
continue-on-error: true
|
|
run: |
|
|
# permittedInsecurePackages is needed for updating some gz-*-vendor packages.
|
|
# Note that this runs without access to SUPERFLORE_GITHUB_TOKEN.
|
|
mkdir -p ~/.config/nixpkgs
|
|
echo '{ permittedInsecurePackages = [ "freeimage-unstable-2021-11-01" ]; }' > ~/.config/nixpkgs/config.nix
|
|
NIX_PATH=nixpkgs=$PWD ./maintainers/scripts/update-ament-vendor.sh || ret=$?
|
|
git commit -m 'Update vendored-source.json files' $(find -name vendored-source.json) || :
|
|
exit $ret
|
|
- name: Create PR
|
|
env:
|
|
# Don't use secrets.GITHUB_TOKEN because it prevents the PR from
|
|
# triggering a build
|
|
# https://help.github.com/en/actions/automating-your-workflow-with-github-actions/events-that-trigger-workflows#about-workflow-events
|
|
SUPERFLORE_GITHUB_TOKEN: ${{ secrets.SUPERFLORE_GITHUB_TOKEN }}
|
|
run: |
|
|
superflore-gen-nix --pr-only \
|
|
--output-repository-path . \
|
|
--upstream-branch develop \
|