Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions .github/workflows/R-CMD-check.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ jobs:
ref: ${{ inputs.ref }}

- name: Update status for rcc
if: github.actor != 'Copilot'
if: github.actor != 'Copilot' && (github.event_name != 'pull_request' || github.event.pull_request.head.repo.full_name == github.repository)
# FIXME: Wrap into action
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
Expand Down Expand Up @@ -121,7 +121,7 @@ jobs:
cache-version: rcc-smoke-2
needs: build, check, website
# 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::.
extra-packages: any::rcmdcheck r-lib/roxygen2 any::decor r-lib/pkgdown deps::.

- uses: ./.github/workflows/custom/after-install
if: hashFiles('.github/workflows/custom/after-install/action.yml') != ''
Expand Down Expand Up @@ -182,7 +182,7 @@ jobs:

- name: Update status for rcc
# FIXME: Wrap into action
if: always() && (github.actor != 'Copilot')
if: always() && (github.actor != 'Copilot') && (github.event_name != 'pull_request' || github.event.pull_request.head.repo.full_name == github.repository)
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
Expand Down
15 changes: 2 additions & 13 deletions .github/workflows/fledge.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -48,25 +48,14 @@ jobs:
fetch-depth: 0
fetch-tags: true

- name: Configure Git identity
run: |
env | sort
git config --local user.name "$GITHUB_ACTOR"
git config --local user.email "$GITHUB_ACTOR@users.noreply.github.com"
shell: bash
- uses: ./.github/workflows/git-identity

- name: Update apt
run: |
sudo apt-get update
shell: bash

- uses: r-lib/actions/setup-r@v2
with:
use-public-rspm: true

- uses: r-lib/actions/setup-r-dependencies@v2
env:
GITHUB_PAT: ${{ secrets.GITHUB_TOKEN }}
- uses: ./.github/workflows/install
with:
pak-version: devel
packages: cynkra/fledge
Expand Down
6 changes: 6 additions & 0 deletions .github/workflows/install/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -74,6 +74,12 @@ runs:
echo "_R_CHECK_BASHISMS_=true" | tee -a $GITHUB_ENV
shell: bash

- name: Review environment variables
run: |
set -x
env | sort
shell: bash

- name: Update apt
if: runner.os == 'Linux'
run: |
Expand Down
22 changes: 17 additions & 5 deletions .github/workflows/style/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,24 +8,36 @@ runs:
run: |
set -x
if [ -f air.toml ]; then
echo enabled=true >> $GITHUB_OUTPUT
echo air_enabled=true >> $GITHUB_OUTPUT
else
echo enabled=false >> $GITHUB_OUTPUT
echo air_enabled=false >> $GITHUB_OUTPUT
fi
if [ -f .clang-format ]; then
echo clang_format_enabled=true >> $GITHUB_OUTPUT
else
echo clang_format_enabled=false >> $GITHUB_OUTPUT
fi
shell: bash

- name: Install air
if: ${{ steps.check.outputs.enabled == 'true' }}
if: ${{ steps.check.outputs.air_enabled == 'true' }}
uses: posit-dev/setup-air@v1

- name: Run air
if: ${{ steps.check.outputs.enabled == 'true' }}
if: ${{ steps.check.outputs.air_enabled == 'true' }}
run: |
air format .
shell: bash

- name: Run clang-format
if: ${{ steps.check.outputs.clang_format_enabled == 'true' }}
run: |
shopt -s nullglob
clang-format -i src/*.{c,cc,cpp,h,hpp}
shell: bash

- name: Check Git status
if: ${{ steps.check.outputs.enabled == 'true' }}
if: ${{ steps.check.outputs.air_enabled == 'true' || steps.check.outputs.clang_format_enabled == 'true' }}
run: |
git status
shell: bash