Skip to content

Commit

Permalink
ci: set up
Browse files Browse the repository at this point in the history
  • Loading branch information
grzuy committed Oct 25, 2023
1 parent 1992436 commit e07eacd
Show file tree
Hide file tree
Showing 4 changed files with 294 additions and 262 deletions.
33 changes: 33 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
name: CI
on:
pull_request:
push:
branches:
- main
jobs:
main:
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
include:
- elixir_version: 1.15.7
otp_version: 26.1.2
lint: true
- elixir_version: 1.14.5
otp_version: 25.3.2.7
steps:
- uses: actions/checkout@v4
- uses: erlef/setup-beam@v1
with:
otp-version: ${{matrix.otp_version}}
elixir-version: ${{matrix.elixir_version}}
- run: mix deps.get
- run: mix format --check-formatted
if: ${{ matrix.lint }}
- run: mix deps.unlock --check-unused
if: ${{ matrix.lint }}
- run: mix deps.compile
# - run: mix compile --warnings-as-errors
# if: ${{ matrix.lint }}
- run: mix test
60 changes: 30 additions & 30 deletions lib/candlex/backend.ex
Original file line number Diff line number Diff line change
Expand Up @@ -813,46 +813,46 @@ defmodule Candlex.Backend do
end

for op <- [
:cholesky,
:conjugate,
:count_leading_zeros,
:imag,
:population_count,
:real
] do
:cholesky,
:conjugate,
:count_leading_zeros,
:imag,
:population_count,
:real
] do
@impl true
def unquote(op)(_out, _tensor) do
raise "unsupported Candlex.Backend.#{unquote(op)} function"
end
end

for op <- [
:any,
:argsort,
:eigh,
:fft,
:ifft,
:lu,
:product,
:qr,
:reverse,
:sort,
] do
:any,
:argsort,
:eigh,
:fft,
:ifft,
:lu,
:product,
:qr,
:reverse,
:sort
] do
@impl true
def unquote(op)(_out, _tensor, _) do
raise "unsupported Candlex.Backend.#{unquote(op)} function"
end
end

for op <- [
:indexed_put,
:map,
:triangular_solve,
:window_max,
:window_min,
:window_product,
:window_sum
] do
:indexed_put,
:map,
:triangular_solve,
:window_max,
:window_min,
:window_product,
:window_sum
] do
@impl true
def unquote(op)(_out, _tensor, _, _) do
raise "unsupported Candlex.Backend.#{unquote(op)} function"
Expand All @@ -865,10 +865,10 @@ defmodule Candlex.Backend do
end

for op <- [
:window_reduce,
:window_scatter_max,
:window_scatter_min
] do
:window_reduce,
:window_scatter_max,
:window_scatter_min
] do
@impl true
def unquote(op)(_out, _tensor, _, _, _, _) do
raise "unsupported Candlex.Backend.#{unquote(op)} function"
Expand Down
2 changes: 1 addition & 1 deletion mix.exs
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ defmodule Candlex.MixProject do
[
app: :candlex,
version: "0.1.0",
elixir: "~> 1.15",
elixir: "~> 1.14",
elixirc_paths: elixirc_paths(Mix.env()),
start_permanent: Mix.env() == :prod,
deps: deps()
Expand Down
Loading

0 comments on commit e07eacd

Please sign in to comment.