Skip to content

Update CI config #99

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
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
39 changes: 24 additions & 15 deletions .github/workflows/CI.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,19 @@ on:
branches:
- main
tags: '*'

concurrency:
# group by workflow and ref; the last slightly strange component ensures that for pull
# requests, we limit to 1 concurrent job, but for the default repository branch we don't
group: ${{ github.workflow }}-${{ github.ref }}-${{ github.ref_name != github.event.repository.default_branch || github.run_number }}
# Cancel intermediate builds, but only if it is a pull request build.
cancel-in-progress: ${{ startsWith(github.ref, 'refs/pull/') }}

# needed to allow julia-actions/cache to delete old caches that it has created
permissions:
actions: write
contents: read

jobs:
test:
name: Julia ${{ matrix.version }} - ${{ matrix.os }} - ${{ matrix.arch }} - ${{ github.event_name }}
Expand All @@ -21,30 +34,26 @@ jobs:
- macOS-latest
- windows-latest
arch:
- x64
- '' # default arch, usually x64 but for macOS also aarch64
- x86
exclude:
- os: macOS-latest
- os: macos-latest # Apple Silicon
arch: x86
- os: macos-latest # Apple Silicon
version: '1.0'
arch: ''
include:
- os: macos-latest # Apple Silicon
version: '1.0'
arch: 'x64' # run x86_64 build of Julia under Rosetta 2 emulation
steps:
- uses: actions/checkout@v4
- uses: julia-actions/setup-julia@v2
with:
version: ${{ matrix.version }}
arch: ${{ matrix.arch }}
- uses: actions/cache@v4
env:
cache-name: cache-artifacts
with:
path: ~/.julia/artifacts
key: ${{ runner.os }}-test-${{ env.cache-name }}-${{ hashFiles('**/Project.toml') }}
restore-keys: |
${{ runner.os }}-test-${{ env.cache-name }}-
${{ runner.os }}-test-
${{ runner.os }}-
arch: ${{ (matrix.arch == '') && runner.arch || matrix.arch }}
- uses: julia-actions/cache@v2
- uses: julia-actions/julia-buildpkg@v1
- uses: julia-actions/julia-runtest@v1
- uses: julia-actions/julia-processcoverage@v1
- uses: codecov/codecov-action@v5
with:
file: lcov.info
17 changes: 17 additions & 0 deletions .github/workflows/TagBot.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,23 @@ on:
types:
- created
workflow_dispatch:
inputs:
lookback:
default: "3"
Comment on lines +7 to +9
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
inputs:
lookback:
default: "3"

Lookback is already 3 by default, no? And IIUC this input will be unused because it isn't passed to the TagBot action.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No, these three lines are about adding to the GutHub UI for manual workflow dispatch an input field that allows overriding the lookback value. That's helpful if TagBot ever again fails and you don't notice within 3 days

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

And does TagBot actually have access to the value the user types in? It's not passed explicitly in the step that invokes TagBot.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes it has. This is how these workflow dispatch inputs work (and I used it like that several times yesterday and today, too)

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Would you be willing to share a link to the docs that describe this implicit argument passing behavior so I can understand it, too?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I would imagine this would be necessary: JuliaRegistries/TagBot#389

# The following is commented out due to https://github.com/JuliaRegistries/TagBot/issues/388
# permissions:
# actions: read
# checks: read
# contents: write
# deployments: read
# issues: read
# discussions: read
# packages: read
# pages: read
# pull-requests: read
# repository-projects: read
# security-events: read
# statuses: read
Comment on lines +10 to +23
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

IMO adding these commented out lines doesn't help much with clarity.

Suggested change
# The following is commented out due to https://github.com/JuliaRegistries/TagBot/issues/388
# permissions:
# actions: read
# checks: read
# contents: write
# deployments: read
# issues: read
# discussions: read
# packages: read
# pages: read
# pull-requests: read
# repository-projects: read
# security-events: read
# statuses: read

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Perhaps not clarity but the next time someone wants to add these lines because the TagBot documentation says one should, they have a chance of knowing there may be a reason not to.

That's said, we can of course hope that TagBot will be fixed soon (one way or another) then this is moot.

i am fine with either way, choose whichever you prefer

jobs:
TagBot:
if: github.event_name == 'workflow_dispatch' || github.actor == 'JuliaTagBot'
Expand Down
Loading