Skip to content
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

Downgrade CI #49

Merged
merged 2 commits into from
Dec 29, 2023
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
1 change: 0 additions & 1 deletion .github/workflows/CI.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,6 @@ jobs:
matrix:
version:
- '1'
- '1.6'
steps:
- uses: actions/checkout@v4
- uses: julia-actions/setup-julia@v1
Expand Down
29 changes: 29 additions & 0 deletions .github/workflows/Downgrade.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
name: Downgrade
on:
pull_request:
branches:
- master
paths-ignore:
- 'docs/**'
push:
branches:
- master
paths-ignore:
- 'docs/**'
jobs:
test:
runs-on: ubuntu-latest
strategy:
matrix:
version: ['1']
steps:
- uses: actions/checkout@v4
- uses: julia-actions/setup-julia@v1
with:
version: ${{ matrix.version }}
- uses: cjdoris/julia-downgrade-compat-action@v1
# if: ${{ matrix.version == '1.6' }}
with:
skip: Pkg,TOML
- uses: julia-actions/julia-buildpkg@v1
- uses: julia-actions/julia-runtest@v1
6 changes: 3 additions & 3 deletions Project.toml
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,9 @@ uuid = "46d2c3a1-f734-5fdb-9937-b9b9aeba4221"
version = "0.2.4"

[compat]
Aqua = "0.8"
Test = "1"
julia = "1.6"
Aqua = "0.8.4"
Test = "1.0.0"
julia = "1.10"
Copy link
Member

Choose a reason for hiding this comment

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

This change seems unnecessary?

Copy link
Member Author

Choose a reason for hiding this comment

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

@ChrisRackauckas decided to move everything to Julia 1.10 as it is likely to be the new LTS.

Copy link
Member

Choose a reason for hiding this comment

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

I think such unnecessary Julia compat changes are quite unfortunate for utility packages such as MuladdMacro that are useful not only for SciML packages but the whole ecosystem.

Copy link
Member

Choose a reason for hiding this comment

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

It's somewhat easiest to just have everything on what will be the new LTS though. At least as we're rolling out the new Downgrade CI which is a surprisingly difficult thing to get right, keeping everything simple is best. I do agree that we could in theory make exceptions for something like this repo which effectively never changes though (though its tests actually needed a change for v1.10)


[extras]
Aqua = "4c88cf16-eb10-579e-8560-4a9242c79595"
Expand Down
26 changes: 12 additions & 14 deletions test/runtests.jl
Original file line number Diff line number Diff line change
Expand Up @@ -92,18 +92,16 @@ end

# Nested expressions
@testset "Nested expressions" begin
@test @macroexpand(@muladd f(x, y, z) = x * y + z) ==
:(f(x, y, z) = $(Base.muladd)(x, y, z))
@test @macroexpand(@muladd function f(x, y, z)
x * y + z
end) ==
:(function f(x, y, z)
$(Base.muladd)(x, y, z)
end)
@test @macroexpand(@muladd(for i in 1:n
z = x * i + y
end)) ==
:(for i in 1:n
z = $(Base.muladd)(x, i, y)
end)
@test Base.remove_linenums!(@macroexpand(@muladd f(x, y, z) = x * y + z)) ==
Base.remove_linenums!(:(f(x, y, z) = $(Base.muladd)(x, y, z)))
@test Base.remove_linenums!(@macroexpand(
@muladd function f(x, y, z)
x * y + z
end)) ==
Base.remove_linenums!(:(
function f(x, y, z)
$(Base.muladd)(x, y, z)
end))
@test Base.remove_linenums!(@macroexpand(@muladd(for i in 1:n z = x * i + y end))) ==
Base.remove_linenums!(:(for i in 1:n z = $(Base.muladd)(x, i, y) end))
end
Loading