Skip to content

Commit

Permalink
Merge branch 'main' into scale
Browse files Browse the repository at this point in the history
  • Loading branch information
maelle authored Mar 6, 2025
2 parents 4c23f9a + 7b36cde commit 26df821
Show file tree
Hide file tree
Showing 655 changed files with 29,173 additions and 18,814 deletions.
5 changes: 4 additions & 1 deletion .Rbuildignore
Original file line number Diff line number Diff line change
Expand Up @@ -51,9 +51,12 @@
^R/revdep\.R$
^compile_commands\.json$
^\.cache$
^rchk$
^vendor\.sh$
^vendor-one\.sh$
^patch$
^man/dot-igraph.progress\.Rd$
^man/dot-igraph.status\.Rd$
^man/dot-extract_constructor_and_modifiers\.Rd$
^man/dot-apply_modifiers\.Rd$
^man/handle_vertex_type_arg\.Rd$
^rchk$
50 changes: 50 additions & 0 deletions .github/workflows/each.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
# Helper workflow to trigger rcc for each commit on a branch

on:
push:
branches:
- each-*

name: each-rcc

jobs:
each-rcc:
runs-on: ubuntu-24.04
outputs:
sha: ${{ steps.commit.outputs.sha }}
versions-matrix: ${{ steps.versions-matrix.outputs.matrix }}
dep-suggests-matrix: ${{ steps.dep-suggests-matrix.outputs.matrix }}

name: "Trigger rcc workflow for each commit"

# Begin custom: services
# End custom: services

steps:
- uses: actions/checkout@v4
with:
ref: ${{ inputs.ref }}
fetch-depth: 0

- name: Enumerate all commits from the repository's main branch
env:
GH_TOKEN: ${{ github.token }}
run: |
# Get name of main branch of repository
# origin/HEAD isn't known here
main=$(git remote show origin | grep 'HEAD branch' | cut -d' ' -f5)
commits=$(git log --reverse --pretty=format:"%H" origin/${main}.. --)
echo $commits
# Run workflow for each commit where the status of the rcc workflow isn't "pending" or "success"
for commit in $commits; do
echo $commit
# Get first status of the workflow with the name "rcc"
status=$(gh api repos/{owner}/{repo}/commits/${commit}/statuses | jq -r '.[] | select(.context == "rcc") | .state' | head -n 1)
echo $status
if [[ "$status" != "pending" && "$status" != "success" ]]; then
echo "Running rcc for commit $commit"
gh workflow run rcc -f ref=$commit -r ${{ github.ref }}
fi
done
shell: bash
56 changes: 31 additions & 25 deletions .github/workflows/vendor.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,14 +3,14 @@ on:
branches:
- main
paths:
- ".github/workflows/vendor.yml"
- ".github/workflows/vendor.yaml"
- "vendor-one.sh"
workflow_dispatch:
schedule:
- cron: "* 2 * * *"
- cron: "*/5 * * * *"

concurrency:
group: ${{ github.workflow }}-${{ github.ref }}-${{ github.head_ref || github.sha }}-${{ github.base_ref || '' }}
cancel-in-progress: true
group: ${{ github.workflow }}

name: vendor

Expand All @@ -24,6 +24,8 @@ jobs:

steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0

- uses: actions/checkout@v4
with:
Expand All @@ -33,30 +35,34 @@ jobs:

- uses: ./.github/workflows/git-identity

- uses: ./.github/workflows/custom/before-install
if: hashFiles('.github/workflows/custom/before-install/action.yml') != ''

- uses: ./.github/workflows/install
with:
cache-version: rcc-vendor
token: ${{ secrets.GITHUB_TOKEN }}
install-r: false
cache-version: vendor
needs: check
extra-packages: any::rcmdcheck, cpp11, decor

- uses: ./.github/workflows/custom/after-install
if: hashFiles('.github/workflows/custom/after-install/action.yml') != ''

- run: |
git checkout -- .
git clean -fdx
tools/update-cigraph.sh .git/igraph
rm -rf .git/igraph

- uses: ./.github/workflows/check
with:
results: ${{ runner.os }}-smoke-test
- name: Vendor sources
id: vendor
run: |
git pull --rebase
./vendor-one.sh .git/igraph
rm -rf .git/igraph
git push --dry-run
# Check if ahead of upstream branch
# If yes, set a step output
if [ $(git rev-list HEAD...origin/main --count) -gt 0 ]; then
# Avoid set-output, it's deprecated
echo "vendor=ok" >> "$GITHUB_OUTPUT"
fi
- if: github.event_name != 'pull_request'
- name: Create PR
if: steps.vendor.outputs.vendor != ''
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
git push -u origin HEAD
set -x
git checkout -b vendor
if git push -u origin HEAD; then
gh pr create --fill-first
gh workflow run rcc -f ref=vendor
gh pr merge --auto --squash
fi
Loading

0 comments on commit 26df821

Please sign in to comment.