Skip to content

Commit

Permalink
ci: fix certain pipelines
Browse files Browse the repository at this point in the history
  • Loading branch information
avik-pal committed Nov 3, 2024
1 parent 5dc5a7c commit 277513d
Show file tree
Hide file tree
Showing 4 changed files with 66 additions and 16 deletions.
4 changes: 2 additions & 2 deletions .buildkite/testing_luxlib.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ steps:
Pkg.instantiate();
Pkg.activate("lib/LuxLib/test");
dev_pkgs = Pkg.PackageSpec[];
for pkg in ("lib/LuxTestUtils", "lib/LuxLib")
for pkg in ("lib/LuxTestUtils", "lib/LuxLib", "lib/MLDataDevices")
push!(dev_pkgs, Pkg.PackageSpec(path=pkg));
end;
Pkg.develop(dev_pkgs)'
Expand Down Expand Up @@ -76,7 +76,7 @@ steps:
Pkg.instantiate();
Pkg.activate("lib/LuxLib/test");
dev_pkgs = Pkg.PackageSpec[];
for pkg in ("lib/LuxTestUtils", "lib/LuxLib")
for pkg in ("lib/LuxTestUtils", "lib/LuxLib", "lib/MLDataDevices")
push!(dev_pkgs, Pkg.PackageSpec(path=pkg));
end;
Pkg.develop(dev_pkgs)'
Expand Down
67 changes: 55 additions & 12 deletions .github/workflows/CI.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,11 @@ on:
- "test/**"
- "Project.toml"
- ".github/workflows/CI.yml"
- "lib/LuxTestUtils/**"
- "lib/LuxCore/**"
- "lib/MLDataDevices/**"
- "lib/WeightInitializers/**"
- "lib/LuxLib/**"
push:
branches:
- main
Expand All @@ -30,6 +35,8 @@ jobs:
- "1.10"
os:
- ubuntu-latest
- macos-latest
- windows-latest
test_group:
- "core_layers"
- "contrib"
Expand All @@ -42,13 +49,6 @@ jobs:
- "eltype_match"
- "fluxcompat"
- "reactant"
include:
- version: "1.10"
os: macos-latest
test_group: "all"
- version: "1.10"
os: windows-latest
test_group: "all"
steps:
- uses: actions/checkout@v4
- uses: julia-actions/setup-julia@v2
Expand All @@ -64,8 +64,29 @@ jobs:
${{ runner.os }}-test-${{ env.cache-name }}-
${{ runner.os }}-test-
${{ runner.os }}-
- uses: julia-actions/julia-buildpkg@v1
- uses: julia-actions/julia-runtest@v1
- name: "Install Dependencies"
run: |
import Pkg
dev_pkgs = Pkg.PackageSpec[]
for pkg in ("lib/LuxCore", "lib/MLDataDevices", "lib/WeightInitializers", "lib/LuxLib",)
push!(dev_pkgs, Pkg.PackageSpec(path=pkg))
end
Pkg.develop(dev_pkgs)
Pkg.Registry.update()
Pkg.instantiate()
Pkg.activate("test")
dev_pkgs = Pkg.PackageSpec[]
for pkg in ("lib/LuxTestUtils", "lib/LuxLib", "lib/MLDataDevices", "lib/LuxCore", ".")
push!(dev_pkgs, Pkg.PackageSpec(path=pkg))
end
Pkg.develop(dev_pkgs)
shell: julia --color=yes --code-coverage=user --depwarn=yes --project=. {0}
- name: "Run Tests"
run: |
import Pkg, Lux
dir = dirname(pathof(Lux))
include(joinpath(dir, "../test/runtests.jl"))
shell: julia --color=yes --code-coverage=user --depwarn=yes --project=test {0}
env:
LUX_TEST_GROUP: ${{ matrix.test_group }}
- uses: julia-actions/julia-processcoverage@v1
Expand All @@ -80,16 +101,38 @@ jobs:

downgrade:
if: ${{ !contains(github.event.head_commit.message, '[skip tests]') && github.base_ref == github.event.repository.default_branch }}
name: Downgrade Julia 1.10
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: julia-actions/setup-julia@v2
with:
version: "1.10"
- uses: julia-actions/julia-downgrade-compat@v1
- uses: julia-actions/julia-buildpkg@v1
- uses: julia-actions/julia-runtest@v1
with:
skip: "LuxCore,MLDataDevices,WeightInitializers,LuxLib"
- name: "Install Dependencies"
run: |
import Pkg
dev_pkgs = Pkg.PackageSpec[]
for pkg in ("lib/LuxCore", "lib/MLDataDevices", "lib/WeightInitializers", "lib/LuxLib",)
push!(dev_pkgs, Pkg.PackageSpec(path=pkg))
end
Pkg.develop(dev_pkgs)
Pkg.Registry.update()
Pkg.instantiate()
Pkg.activate("test")
dev_pkgs = Pkg.PackageSpec[]
for pkg in ("lib/LuxTestUtils", "lib/LuxLib", "lib/MLDataDevices", "lib/LuxCore", ".")
push!(dev_pkgs, Pkg.PackageSpec(path=pkg))
end
Pkg.develop(dev_pkgs)
shell: julia --color=yes --code-coverage=user --depwarn=yes --project=. {0}
- name: "Run Tests"
run: |
import Pkg, Lux
dir = dirname(pathof(Lux))
include(joinpath(dir, "../test/runtests.jl"))
shell: julia --color=yes --code-coverage=user --depwarn=yes --project=test {0}
- uses: julia-actions/julia-processcoverage@v1
with:
directories: src,ext
Expand Down
7 changes: 6 additions & 1 deletion .github/workflows/CIPreRelease.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: CIPreRelease
name: CIPreRelease (Lux)
on:
pull_request:
branches:
Expand All @@ -9,6 +9,11 @@ on:
- "test/**"
- "Project.toml"
- ".github/workflows/CI.yml"
- "lib/LuxTestUtils/**"
- "lib/LuxCore/**"
- "lib/MLDataDevices/**"
- "lib/WeightInitializers/**"
- "lib/LuxLib/**"
push:
branches:
- main
Expand Down
4 changes: 3 additions & 1 deletion .github/workflows/CI_LuxLib.yml
Original file line number Diff line number Diff line change
Expand Up @@ -163,6 +163,8 @@ jobs:
with:
version: "1.10"
- uses: julia-actions/julia-downgrade-compat@v1
with:
skip: "LuxCore,MLDataDevices"
- name: "Install Dependencies"
run: |
import Pkg
Expand All @@ -175,7 +177,7 @@ jobs:
Pkg.instantiate()
Pkg.activate("lib/LuxLib/test")
dev_pkgs = Pkg.PackageSpec[]
for pkg in ("lib/LuxTestUtils", "lib/LuxLib")
for pkg in ("lib/LuxTestUtils", "lib/LuxLib", "lib/MLDataDevices")
push!(dev_pkgs, Pkg.PackageSpec(path=pkg))
end
Pkg.develop(dev_pkgs)
Expand Down

0 comments on commit 277513d

Please sign in to comment.