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

Enable GPU compatibility check in CI #2168

Open
wants to merge 12 commits into
base: main
Choose a base branch
from
Open
85 changes: 85 additions & 0 deletions .github/workflows/GPUCompat.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,85 @@
name: GPU Compatibility
huiyuxie marked this conversation as resolved.
Show resolved Hide resolved

on:
pull_request:
paths-ignore:
- 'AUTHORS.md'
- 'CITATION.bib'
- 'CONTRIBUTING.md'
- 'LICENSE.md'
- 'NEWS.md'
- 'README.md'
- '.zenodo.json'
- '.github/workflows/benchmark.yml'
- '.github/workflows/CompatHelper.yml'
- '.github/workflows/TagBot.yml'
- 'benchmark/**'
- 'docs/**'
- 'utils/**'
workflow_dispatch:

concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true

jobs:
test:
if: "!contains(github.event.head_commit.message, 'skip ci')"
name: ${{ matrix.os }} - ${{ matrix.arch }}
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
include:
- version: '1.10'
os: ubuntu-latest
arch: x64
- version: '1.10'
os: windows-latest
arch: x64
# CUDA.jl only supports 64-bit Linux and Windows, see https://github.com/JuliaGPU/CUDA.jl?tab=readme-ov-file#requirements
steps:
- name: Checkout repository
uses: actions/checkout@v4

- name: Set up Julia
uses: julia-actions/setup-julia@v2
with:
version: ${{ matrix.version }}
arch: ${{ matrix.arch }}

- name: Display version info
run: julia -e 'using InteractiveUtils; versioninfo(verbose=true)'

- name: Cache Julia packages
uses: julia-actions/cache@v2

- name: Build project
uses: julia-actions/julia-buildpkg@v1

# Only CUDA.jl is needed for GPU compatibility test now
- name: Add CUDA.jl to environment
run: |
julia --project=. -e '
using Pkg;
Pkg.activate(temp=true);
Pkg.develop(PackageSpec(path=pwd()));
Pkg.add("CUDA");
huiyuxie marked this conversation as resolved.
Show resolved Hide resolved
Pkg.update()'

# - name: Add Metal.jl to environment
# run: |
# julia --project=. -e '
# using Pkg;
# Pkg.activate(temp=true);
# Pkg.develop(PackageSpec(path=pwd()));
# Pkg.add("Metal");
# Pkg.update()'

# - name: Add AMDGPU.jl to environment
# run: |
# julia --project=. -e '
# using Pkg;
# Pkg.activate(temp=true);
# Pkg.add("AMDGPU");
# Pkg.update()'
Loading