Allow circuits_i2c version 1.x #36

Merged
balexand1 merged 8 commits from i2c_1x into main 2023-08-21 15:33:04 +12:00
2 changed files with 28 additions and 1 deletions

View file

@ -44,6 +44,29 @@ test:
script:
- mix test
build_and_test_i2c_1_x:
image: elixir:latest
stage: test
cache:
key: "$CI_JOB_NAME"
paths:
- deps
- _build
- .hex
- .mix
script:
- mix local.hex --force
- mix local.rebar --force
- CI_I2C_1_X=true mix deps.get
- mix deps.compile
- mix test
artifacts:
paths:
- _build/
- deps/
- .hex
- .mix
integrate:
image: elixir:latest
stage: test

View file

@ -44,7 +44,11 @@ defmodule Wafer.MixProject do
defp deps do
[
{:circuits_gpio, "~> 1.0", optional: true},
{:circuits_i2c, "~> 2.0", optional: true},
if System.get_env("CI_I2C_1_X") == "true" do
{:circuits_i2c, "~> 1.0", optional: true}
else
{:circuits_i2c, "~> 2.0 or ~> 1.0", optional: true}
end,
{:circuits_spi, "~> 1.3", optional: true},
{:credo, "~> 1.6", only: ~w[dev test]a, runtime: false},
{:earmark, "~> 1.4", only: ~w[dev test]a},