Skip to content
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
17 changes: 12 additions & 5 deletions .buildkite/pipeline.yml
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
# Tests on GPU back-ends. Draft pull requests skip them, unless selected by name in the last commit message: `[only cuda]`
# or `[only tests]` for all of them. `[skip amdgpu]` or `[skip tests]` does the opposite.

steps:
- label: "CUDA - Julia {{matrix.version}}"
matrix:
Expand All @@ -7,11 +10,15 @@ steps:
plugins:
- JuliaCI/julia#v1:
version: "{{matrix.version}}"
- JuliaCI/julia-test#v1: ~
#- JuliaCI/julia-test#v1: ~
command: julia --eval='println("Skipping CUDA tests - pipeline configured to do nothing")'
agents:
queue: "cuda"
if: build.message !~ /\[skip tests\]/
env:
WITH_CUDA_TESTS: "true"
WITH_CPU_TESTS: "false"
# if: |
# build.message !~ /\[skip [^\]]*(tests|cuda)/ &&
# (build.message =~ /\[only [^\]]*(tests|cuda)/ ||
# build.message !~ /\[only / && !build.pull_request.draft)
timeout_in_minutes: 60

env:
JULIA_PKG_SERVER_REGISTRY_PREFERENCE: "eager"
62 changes: 62 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,62 @@
name: CI
on:
push:
branches:
- main
pull_request:
types: [unlabeled, opened, synchronize, reopened]
workflow_dispatch:


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/') }}

# Only trigger the job when `draft` label is not assigned to the PR
jobs:
test:
name: Julia ${{ matrix.version }} - ${{ matrix.os }} - ${{ matrix.arch }}
runs-on: ${{ matrix.os }}
if: contains(github.event.pull_request.labels.*.name, 'draft') == false
strategy:
matrix:
version:
- '1.10'
os:
- ubuntu-latest
arch:
- x64
env:
GITHUB_CI: "true"
steps:
- uses: actions/checkout@v7
with:
lfs: "true"
- uses: julia-actions/setup-julia@latest
with:
version: ${{ matrix.version }}
arch: ${{ matrix.arch }}
- uses: actions/cache@v6
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 }}-
- uses: julia-actions/julia-buildpkg@latest
- uses: julia-actions/julia-runtest@latest
env:
WITH_CUDA_TESTS: "false"
WITH_CPU_TESTS: "true"
- uses: julia-actions/julia-processcoverage@latest
- name: Upload coverage reports to Codecov
uses: codecov/codecov-action@v7
env:
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}
with:
file: lcov.info
15 changes: 15 additions & 0 deletions .github/workflows/format_check.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
## Check that the code in a PR is correctly formatted
## from https://github.com/julia-actions/julia-format
name: Format check
on:
pull_request:
types: [opened, reopened, synchronize, labeled, unlabeled]
workflow_dispatch:
jobs:
code-style:
runs-on: ubuntu-latest
steps:
- uses: julia-actions/julia-format@v3
with:
version: "2"
suggestion-label: "format-suggest"
59 changes: 59 additions & 0 deletions JuliaFormat.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,59 @@
# Configuration file for code formatting
# see here for default options : https://github.com/domluna/JuliaFormatter.jl#formatting-options
style = "default"

[options]
always_for_in = true
whitespace_typedefs = true
whitespace_ops_in_indices = true
remove_extra_newlines = true
short_to_long_function_def = true
long_to_short_function_def = false
# always_use_return = true
whitespace_in_kwargs = true
format_docstrings = false
conditional_to_if = true
trailing_comma = true
normalize_line_endings = "unix"
join_lines_based_on_source = false
separate_kwargs_with_semicolon = true
align_assignment = true
align_struct_field = true
align_conditional = true
# align_pair_arrow = true
# align_matrix = true
# format_markdown = true


# possible style : sciml, blue, yas

# ### SciML options
# whitespace_ops_in_indices = true
# remove_extra_newlines = true
# always_for_in = true
# whitespace_typedefs = true
# normalize_line_endings = "unix"

# ### YAS options
# always_for_in = true
# whitespace_ops_in_indices = true
# remove_extra_newlines = true
# import_to_using = true
# pipe_to_function_call = true
# short_to_long_function_def = true
# always_use_return = true
# whitespace_in_kwargs = false
# join_lines_based_on_source = true
# separate_kwargs_with_semicolon = true

# ### Blue option
# always_use_return = true
# short_to_long_function_def = true
# whitespace_ops_in_indices = true
# remove_extra_newlines = true
# always_for_in = true
# import_to_using = true
# pipe_to_function_call = true
# whitespace_in_kwargs = false
# annotate_untyped_fields_with_any = false
# separate_kwargs_with_semicolon = true
2 changes: 1 addition & 1 deletion src/BcubeAccelerated.jl
Original file line number Diff line number Diff line change
Expand Up @@ -17,4 +17,4 @@ include("fespace.jl")
include("domain.jl")
include("assembler.jl")

end
end
2 changes: 1 addition & 1 deletion src/adapt.jl
Original file line number Diff line number Diff line change
Expand Up @@ -197,4 +197,4 @@ end
Adapt.adapt_structure(to::AbstractBcubeBackendAcc, x) = adapt_structure(get_backend(to), x)

Adapt.adapt(to::Bcube.AbstractBcubeBackend, x) = x
Adapt.adapt(to::AbstractBcubeBackendAcc, x) = adapt(get_backend(to), x)
Adapt.adapt(to::AbstractBcubeBackendAcc, x) = adapt(get_backend(to), x)
2 changes: 1 addition & 1 deletion src/domain.jl
Original file line number Diff line number Diff line change
Expand Up @@ -119,4 +119,4 @@ function Bcube.get_return_type_and_codim(
_T = Base.return_types(i -> _f(i, valSize), (Int,))
T = eltype(first(_T))
return T, N
end
end
Loading
Loading