Skip to content

Commit

Permalink
Update to Elixir 1.8!!
Browse files Browse the repository at this point in the history
  • Loading branch information
connor rigby committed Jul 1, 2019
1 parent 87ee868 commit a7275a4
Show file tree
Hide file tree
Showing 17 changed files with 130 additions and 357 deletions.
48 changes: 31 additions & 17 deletions .circleci/config.yml
Expand Up @@ -2,15 +2,23 @@ version: 2.0
defaults: &defaults
working_directory: /nerves/build
docker:
<<<<<<< HEAD
- image: nervesproject/nerves_system_br:1.6.8
environment:
ELIXIR_VERSION: 1.8.1
=======
- image: nervesproject/nerves_system_br:1.6.1
>>>>>>> 69c76945... Update to Elixir 1.8!!

install_elixir: &install_elixir
run:
name: Install Elixir
command: |
<<<<<<< HEAD
wget https://github.com/elixir-lang/elixir/releases/download/v1.8.1/Precompiled.zip
=======
wget https://github.com/elixir-lang/elixir/releases/download/v1.8.0/Precompiled.zip
>>>>>>> 69c76945... Update to Elixir 1.8!!
unzip -d /usr/local/elixir Precompiled.zip
echo 'export PATH=/usr/local/elixir/bin:$PATH' >> $BASH_ENV

Expand Down Expand Up @@ -56,13 +64,12 @@ build_firmware_steps: &build_firmware_steps
- run:
name: Setup ENV
command: |
echo "/nerves/build/farmbot_os/$MIX_TARGET" > MIX_TARGET
echo "/nerves/build/farmbot_os/$MIX_ENV" > MIX_ENV
cp /nerves/build/farmbot_os/mix.lock.$MIX_TARGET MIX_LOCK
echo "$MIX_TARGET" > MIX_TARGET
echo "$MIX_ENV" > MIX_ENV
- restore_cache:
key: v9-fbos-{{ checksum "MIX_TARGET" }}-{{ checksum "MIX_ENV" }}-dependency-cache-{{ checksum "MIX_LOCK" }}
key: v9-fbos-{{ checksum "MIX_TARGET" }}-{{ checksum "MIX_ENV" }}-dependency-cache-{{ checksum "farmbot_os/mix.lock" }}
- restore_cache:
key: v9-fbos-host-test-dependency-cache-{{ checksum "mix.lock.host" }}
key: v9-fbos-host-test-dependency-cache-{{ checksum "farmbot_os/mix.lock" }}
- <<: *install_elixir
- <<: *install_hex_archives
- run:
Expand All @@ -80,7 +87,7 @@ build_firmware_steps: &build_firmware_steps
command: |
cp /nerves/build/farmbot_os/_build/${MIX_TARGET}/${MIX_ENV}/nerves/images/farmbot.fw /nerves/deploy/system/artifacts/farmbot-${MIX_TARGET}-$(cat VERSION).fw
- save_cache:
key: v9-fbos-{{ checksum "MIX_TARGET" }}-{{ checksum "MIX_ENV" }}-dependency-cache-{{ checksum "MIX_LOCK" }}
key: v9-fbos-{{ checksum "MIX_TARGET" }}-{{ checksum "MIX_ENV" }}-dependency-cache-{{ checksum "farmbot_os/mix.lock" }}
paths:
- /nerves/build/farmbot_os/_build/
- /nerves/build/farmbot_os/deps/
Expand All @@ -97,11 +104,10 @@ deploy_nerves_hub_firmware_steps: &deploy_nerves_hub_firmware_steps
- run:
name: Setup ENV
command: |
echo "/nerves/build/farmbot_os/$MIX_TARGET" > MIX_TARGET
echo "/nerves/build/farmbot_os/$MIX_ENV" > MIX_ENV
cp /nerves/build/farmbot_os/mix.lock.$MIX_TARGET MIX_LOCK
echo "$MIX_TARGET" > MIX_TARGET
echo "$MIX_ENV" > MIX_ENV
- restore_cache:
key: v9-fbos-{{ checksum "MIX_TARGET" }}-{{ checksum "MIX_ENV" }}-dependency-cache-{{ checksum "MIX_LOCK" }}
key: v9-fbos-{{ checksum "MIX_TARGET" }}-{{ checksum "MIX_ENV" }}-dependency-cache-{{ checksum "farmbot_os/mix.lock" }}
- restore_cache:
key: nerves/deploy/system-{{ checksum "MIX_TARGET" }}-{{ .Branch }}-{{ .Revision }}-{{ .Environment.CIRCLE_TAG }}
- <<: *install_elixir
Expand All @@ -127,7 +133,7 @@ jobs:
MIX_ENV: test
MIX_TARGET: host
NERVES_LOG_DISABLE_PROGRESS_BAR: "yes"
ELIXIR_VERSION: 1.7.3
ELIXIR_VERSION: 1.8.0
steps:
- checkout
- restore_cache:
Expand Down Expand Up @@ -155,7 +161,7 @@ jobs:
MIX_ENV: test
MIX_TARGET: host
NERVES_LOG_DISABLE_PROGRESS_BAR: "yes"
ELIXIR_VERSION: 1.7.3
ELIXIR_VERSION: 1.8.0
steps:
- checkout
- restore_cache:
Expand Down Expand Up @@ -183,7 +189,7 @@ jobs:
MIX_ENV: test
MIX_TARGET: host
NERVES_LOG_DISABLE_PROGRESS_BAR: "yes"
ELIXIR_VERSION: 1.7.3
ELIXIR_VERSION: 1.8.0
TZ: "America/Los_Angeles"
steps:
- checkout
Expand Down Expand Up @@ -231,7 +237,7 @@ jobs:
MIX_ENV: test
MIX_TARGET: host
NERVES_LOG_DISABLE_PROGRESS_BAR: "yes"
ELIXIR_VERSION: 1.7.3
ELIXIR_VERSION: 1.8.0
SKIP_ARDUINO_BUILD: 1
steps:
- checkout
Expand Down Expand Up @@ -263,12 +269,12 @@ jobs:
MIX_ENV: test
MIX_TARGET: host
NERVES_LOG_DISABLE_PROGRESS_BAR: "yes"
ELIXIR_VERSION: 1.7.3
ELIXIR_VERSION: 1.8.0
steps:
- checkout
- run: git submodule update --init --recursive
- restore_cache:
key: v9-fbos-host-test-dependency-cache-{{ checksum "farmbot_os/mix.lock.host" }}
key: v9-fbos-host-test-dependency-cache-{{ checksum "farmbot_os/mix.lock" }}
- <<: *install_elixir
- <<: *install_hex_archives
- run:
Expand All @@ -280,7 +286,7 @@ jobs:
mix format --check-formatted
mix test
- save_cache:
key: v9-fbos-host-test-dependency-cache-{{ checksum "farmbot_os/mix.lock.host" }}
key: v9-fbos-host-test-dependency-cache-{{ checksum "farmbot_os/mix.lock" }}
paths:
- farmbot_os/_build/host
- farmbot_os/deps/host
Expand Down Expand Up @@ -417,7 +423,11 @@ jobs:
<<: *defaults
environment:
MIX_ENV: prod
<<<<<<< HEAD
ELIXIR_VERSION: 1.8.1
=======
ELIXIR_VERSION: 1.8.0
>>>>>>> 69c76945... Update to Elixir 1.8!!
steps:
- checkout
- run:
Expand Down Expand Up @@ -473,7 +483,11 @@ jobs:
<<: *defaults
environment:
MIX_ENV: prod
<<<<<<< HEAD
ELIXIR_VERSION: 1.8.1
=======
ELIXIR_VERSION: 1.8.0
>>>>>>> 69c76945... Update to Elixir 1.8!!
steps:
- checkout
- run:
Expand Down
2 changes: 1 addition & 1 deletion ELIXIR_VERSION
@@ -1 +1 @@
~> 1.6
~> 1.8
8 changes: 4 additions & 4 deletions farmbot_celery_script/mix.exs
Expand Up @@ -44,10 +44,10 @@ defmodule Farmbot.CeleryScript.RunTime.MixProject do
# Run "mix help deps" to learn about dependencies.
defp deps do
[
{:excoveralls, "~> 0.10", only: [:test]},
{:dialyxir, "~> 1.0.0-rc.3", only: [:dev], runtime: false},
{:ex_doc, "~> 0.19", only: [:docs], runtime: false},
{:jason, "~> 1.1", only: [:test, :dev]}
{:jason, "~> 1.1", only: [:test, :dev]},
{:excoveralls, "~> 0.10", only: [:test], targets: [:host]},
{:dialyxir, "~> 1.0.0-rc.3", only: [:dev], targets: [:host], runtime: false},
{:ex_doc, "~> 0.19", only: [:dev], targets: [:host], runtime: false}
]
end
end
3 changes: 2 additions & 1 deletion farmbot_core/lib/project.ex
Expand Up @@ -2,10 +2,11 @@ defmodule Farmbot.Project do
@moduledoc "Farmbot project config"

@version Mix.Project.config[:version] || Mix.raise("Missing Project key version")
@target Mix.Project.config[:target] || Mix.raise("Missing Project key target")
@commit Mix.Project.config[:commit] || Mix.raise("Missing Project key commit")
@branch Mix.Project.config[:branch] || Mix.raise("Missing Project key branch")
@arduino_commit Mix.Project.config[:arduino_commit] || Mix.raise("Missing Project key arduino_commit")

@target Mix.target()
@env Mix.env()
@target Mix.target()

Expand Down
6 changes: 3 additions & 3 deletions farmbot_core/mix.exs
Expand Up @@ -71,9 +71,9 @@ defmodule FarmbotCore.MixProject do
{:timex, "~> 3.4"},
{:jason, "~> 1.1"},
{:muontrap, "~> 0.4.0"},
{:dialyxir, "~> 1.0.0-rc.3", only: [:dev], runtime: false},
{:ex_doc, "~> 0.19", only: [:docs], runtime: false},
{:excoveralls, "~> 0.10", only: :test}
{:excoveralls, "~> 0.10", only: [:test], targets: [:host]},
{:dialyxir, "~> 1.0.0-rc.3", only: [:dev], targets: [:host], runtime: false},
{:ex_doc, "~> 0.19", only: [:dev], targets: [:host], runtime: false}
]
end

Expand Down
4 changes: 0 additions & 4 deletions farmbot_core/priv/asset/migrations/.formatter.exs

This file was deleted.

2 changes: 2 additions & 0 deletions farmbot_ext/config/farmbot_core.exs
Expand Up @@ -10,6 +10,8 @@ config :farmbot_core, Farmbot.AssetWorker.Farmbot.Asset.FarmwareInstallation,
error_retry_time_ms: 30_000,
install_dir: "/tmp/farmware"

config :farmbot_core, Farmbot.FarmwareRuntime, runtime_dir: "/tmp/farmware_runtime"

config :farmbot_core, Farmbot.BotState.FileSystem,
root_dir: "/tmp/farmbot_state",
sleep_time: 200
Expand Down
15 changes: 10 additions & 5 deletions farmbot_ext/mix.exs
Expand Up @@ -26,15 +26,20 @@ defmodule Farmbot.Ext.MixProject do
defp deps do
[
{:farmbot_core, path: "../farmbot_core", env: Mix.env()},
{:ranch, "~> 1.5", override: true},
{:ranch_proxy_protocol, "~> 2.0", override: true},

# Hack for AMQP to compile
{:ranch_proxy_protocol,
override: true,
git: "https://github.com/heroku/ranch_proxy_protocol.git",
ref: "4e0f73a385f37cc6f277363695e91f4fc7a81f24"},
{:ranch, "1.5.0", override: true},
{:tesla, "~> 1.2"},
{:hackney, "~> 1.14"},
{:uuid, "~> 1.1"},
{:amqp, "~> 1.0"},
{:excoveralls, "~> 0.10", only: [:test]},
{:dialyxir, "~> 1.0.0-rc.3", only: [:dev], runtime: false},
{:ex_doc, "~> 0.19", only: [:docs], runtime: false}
{:excoveralls, "~> 0.10", only: [:test], targets: [:host]},
{:dialyxir, "~> 1.0.0-rc.3", only: [:dev], targets: [:host], runtime: false},
{:ex_doc, "~> 0.19", only: [:dev], targets: [:host], runtime: false}
]
end
end

0 comments on commit a7275a4

Please sign in to comment.