Skip to content

Commit

Permalink
ci: merge LuxCUDA testing scripts
Browse files Browse the repository at this point in the history
  • Loading branch information
avik-pal committed Nov 3, 2024
1 parent 724a8e4 commit 0198127
Show file tree
Hide file tree
Showing 15 changed files with 122 additions and 391 deletions.
12 changes: 12 additions & 0 deletions .buildkite/pipeline.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ steps:
diff: ".buildkite/scripts/diff.sh $BUILDKITE_COMMIT"
interpolation: false
watch:
# Core Lux Testing
- path:
- "src/"
- "ext/"
Expand Down Expand Up @@ -43,6 +44,14 @@ steps:
agents:
queue: "juliagpu"

# LuxCUDA Testing
- path:
- "lib/LuxCUDA/"
config:
command: "buildkite-agent pipeline upload .buildkite/testing_luxcuda.yml"
agents:
queue: "juliagpu"

- label: "Triggering Pipelines (Main Branch / Tag)"
if: build.branch == "main" || build.tag != null
agents:
Expand All @@ -51,3 +60,6 @@ steps:
buildkite-agent pipeline upload .buildkite/testing.yml
buildkite-agent pipeline upload .buildkite/documentation.yml
buildkite-agent pipeline upload .buildkite/benchmarks.yml
# Subpackage testing
buildkite-agent pipeline upload .buildkite/testing_luxcuda.yml
29 changes: 29 additions & 0 deletions .buildkite/testing_luxcuda.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
steps:
- group: ":julia: CUDA GPU"
steps:
- label: ":julia: Julia: {{matrix.julia}}"
plugins:
- JuliaCI/julia#v1:
version: "{{matrix.julia}}"
- JuliaCI/julia-coverage#v1:
codecov: true
dirs:
- lib/LuxCUDA/src
command: |
julia --color=yes --code-coverage=user --depwarn=yes --project=lib/LuxCUDA -e '
import Pkg;
Pkg.Registry.update();
Pkg.instantiate();
Pkg.test(; coverage="user")'
agents:
queue: "juliagpu"
cuda: "*"
if: build.message !~ /\[skip tests\]/
timeout_in_minutes: 60
matrix:
setup:
julia:
- "1"

env:
SECRET_CODECOV_TOKEN: "jQ0BMTQgyZx7QGyU0Q2Ec7qB9mtE2q/tDu0FsfxvEG7/zOAGvXkyXrzIFFOQxvDoFcP+K2+hYZKMxicYdNqzr5wcxu505aNGN2GM3wyegAr+hO6q12bCFYx6qXzU9FLCCdeqINqn9gUSSOlGtWNFrbAlrTyz/D4Yo66TqBDzvaLL63FMnhCLaXW/zJt3hNuEAJaPY2O6Ze1rX2WZ3Y+i+s3uQ8aLImtoCJhPe8CRx+OhuYiTzGhynFfGntZ0738/1RN4gNM0S/hTC4gLE7XMVBanJpGh32rFaiDwW4zAyXKBrDkL3QA3MS1RvLTJxGJ085S16hCk0C4ddAhZCvIM9Q==;U2FsdGVkX1+bXdFeKMs5G79catOCyby2n07A2fg0FjVAvrjQLZ0yfvDS4paJiFikLkodho0khz2YALKb2Y0K6w=="
31 changes: 1 addition & 30 deletions .github/workflows/CI.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: CI
name: CI (Lux)
on:
pull_request:
branches:
Expand Down Expand Up @@ -155,34 +155,5 @@ jobs:
verbose: true
fail_ci_if_error: true

invalidations:
# Only run on PRs to the default branch.
# In the PR trigger above branches can be specified only explicitly whereas this check should work for master, main, or any other default branch
if: github.base_ref == github.event.repository.default_branch
runs-on: ubuntu-latest
steps:
- uses: julia-actions/setup-julia@v2
with:
version: "1"
- uses: actions/checkout@v4
- uses: julia-actions/julia-buildpkg@v1
- uses: julia-actions/julia-invalidations@v1
id: invs_pr

- uses: actions/checkout@v4
with:
ref: ${{ github.event.repository.default_branch }}
- uses: julia-actions/julia-buildpkg@v1
- uses: julia-actions/julia-invalidations@v1
id: invs_default

- name: Report invalidation counts
run: |
echo "Invalidations on default branch: ${{ steps.invs_default.outputs.total }} (${{ steps.invs_default.outputs.deps }} via deps)" >> $GITHUB_STEP_SUMMARY
echo "This branch: ${{ steps.invs_pr.outputs.total }} (${{ steps.invs_pr.outputs.deps }} via deps)" >> $GITHUB_STEP_SUMMARY
- name: Check if the PR does increase number of invalidations
if: steps.invs_pr.outputs.total > steps.invs_default.outputs.total
run: exit 1

env:
BACKEND_GROUP: "CPU"
80 changes: 80 additions & 0 deletions .github/workflows/CI_LuxCUDA.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,80 @@
name: CI (LuxCUDA)
on:
pull_request:
branches:
- main
paths:
- "lib/LuxCUDA/**"
- ".github/workflows/CI_LuxCUDA.yml"
push:
branches:
- main

concurrency:
# Skip intermediate builds: always.
# Cancel intermediate builds: only if it is a pull request build.
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: ${{ startsWith(github.ref, 'refs/pull/') }}

jobs:
test:
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
version:
- "1"
steps:
- uses: actions/checkout@v4
- uses: julia-actions/setup-julia@v2
with:
version: ${{ matrix.version }}
- 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 }}-
- name: "Install Dependencies and Run Tests"
run: |
import Pkg
Pkg.Registry.update()
Pkg.instantiate()
Pkg.test(; coverage="user")
shell: julia --color=yes --code-coverage=user --depwarn=yes --project=lib/LuxCUDA {0}
- uses: julia-actions/julia-processcoverage@v1
- uses: codecov/codecov-action@v4
with:
files: lcov.info
token: ${{ secrets.CODECOV_TOKEN }}
verbose: true
fail_ci_if_error: true

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
- name: "Install Dependencies and Run Tests"
run: |
import Pkg
Pkg.Registry.update()
Pkg.instantiate()
Pkg.test(; coverage="user")
shell: julia --color=yes --code-coverage=user --depwarn=yes --project=lib/LuxCUDA {0}
- uses: julia-actions/julia-processcoverage@v1
- uses: codecov/codecov-action@v4
with:
files: lcov.info
token: ${{ secrets.CODECOV_TOKEN }}
verbose: true
fail_ci_if_error: true
9 changes: 0 additions & 9 deletions lib/LuxCUDA/.JuliaFormatter.toml

This file was deleted.

77 changes: 0 additions & 77 deletions lib/LuxCUDA/.buildkite/pipeline.yml

This file was deleted.

7 changes: 0 additions & 7 deletions lib/LuxCUDA/.github/dependabot.yml

This file was deleted.

47 changes: 0 additions & 47 deletions lib/LuxCUDA/.github/workflows/CI.yml

This file was deleted.

44 changes: 0 additions & 44 deletions lib/LuxCUDA/.github/workflows/CompatHelper.yml

This file was deleted.

Loading

0 comments on commit 0198127

Please sign in to comment.