Skip to content

Commit

Permalink
Merge branch 'main' into parent
Browse files Browse the repository at this point in the history
  • Loading branch information
krlmlr committed Jan 9, 2025
2 parents df7edff + df4f411 commit bd92a5f
Show file tree
Hide file tree
Showing 323 changed files with 10,695 additions and 10,822 deletions.
4 changes: 4 additions & 0 deletions .Rbuildignore
Original file line number Diff line number Diff line change
Expand Up @@ -51,8 +51,12 @@
^R/revdep\.R$
^compile_commands\.json$
^\.cache$
^rchk$
^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$
^vendor\.sh$
^vendor-one\.sh$
^patch$
7 changes: 4 additions & 3 deletions .github/workflows/R-CMD-check.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -108,14 +108,15 @@ jobs:
# Beware of using dev pkgdown here, has brought in dev dependencies in the past
extra-packages: any::rcmdcheck r-lib/roxygen2 any::decor r-lib/styler r-lib/pkgdown deps::.

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

# Must come after the custom after-install workflow
- name: Install package
run: |
_R_SHLIB_STRIP_=true R CMD INSTALL .
shell: bash

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

- id: versions-matrix
# Only run for pull requests if the base repo is different from the head repo, not for workflow_dispatch if not requested, always run for other events
if: (github.event_name != 'pull_request' || github.event.pull_request.head.repo.full_name != github.repository) && (github.event_name != 'workflow_dispatch' || inputs.versions-matrix)
Expand Down
48 changes: 48 additions & 0 deletions .github/workflows/build-and-check.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
# For help debugging build failures open an issue on the RStudio community with the 'github-actions' tag.
# https://community.rstudio.com/new-topic?category=Package%20development&tags=github-actions
on:
push:
branches:
- main
- fix/*
pull_request:
branches:
- main
- fix/*
schedule:
- cron: '0 2 * * *'

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

name: R-CMD-check-extra

jobs:
sanitizer:
runs-on: ubuntu-22.04

name: Sanitizer

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

- name: apt update
run: |
sudo apt-get update
sudo apt-get install -y libarpack2-dev
shell: bash

- name: run sanitizer
uses: addnab/docker-run-action@v3
with:
image: ghcr.io/krlmlr/rigraph-san:main
options: --rm --platform linux/amd64 -v ${{ github.workspace }}:/rigraph
run: |
set -e
printenv
cd rigraph
RDcsan CMD INSTALL . --no-byte-compile
TESTTHAT_PARALLEL=false CI=true RDcsan -q -e 'testthat::test_local(reporter = c("location", "summary"), load_package = "installed")'
10 changes: 10 additions & 0 deletions .github/workflows/custom/after-install/action.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
name: 'Custom steps to run after R packages are installed'

runs:
using: "composite"
steps:
- name: Use GLPK on macOS
if: runner.os == 'macOS'
run: |
echo -e 'CPPFLAGS = -I/opt/homebrew/include\nLDFLAGS = -L/opt/homebrew/lib' | tee ~/.R/Makevars
shell: bash
6 changes: 6 additions & 0 deletions .github/workflows/custom/before-install/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,3 +7,9 @@ runs:
run: |
echo '_R_CHECK_PKG_SIZES_=FALSE' | tee -a $GITHUB_ENV
shell: bash

- name: Install GLPK on macOS
if: runner.os == 'macOS'
run: |
brew install glpk
shell: bash
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
13 changes: 9 additions & 4 deletions .github/workflows/fledge.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,7 @@ jobs:
- uses: actions/checkout@v4
with:
fetch-depth: 0
fetch-tags: true

- name: Configure Git identity
run: |
Expand Down Expand Up @@ -103,10 +104,14 @@ jobs:
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
set -x
gh pr create --base main --head fledge --fill-first
gh workflow run rcc -f ref=$(git rev-parse HEAD)
gh pr merge --squash --auto
set -ex
if [ -n "$(git diff main --numstat)" ]; then
gh pr create --base main --head fledge --fill-first
gh workflow run rcc -f ref=$(git rev-parse HEAD)
gh pr merge --squash --auto
else
echo "No changes."
fi
shell: bash

- name: Check release
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/lock.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ jobs:
lock:
runs-on: ubuntu-24.04
steps:
- uses: dessant/lock-threads@v5
- uses: krlmlr/lock-threads@patch-1
with:
github-token: ${{ github.token }}
issue-inactive-days: "365"
Expand Down
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -20,3 +20,4 @@ cran
/docs
/compile_commands.json
/.cache
/rchk
Loading

0 comments on commit bd92a5f

Please sign in to comment.