From 553b021ca8aa69b405b6a386a4238d99625cfb3f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Daniel=20Jod=C5=82o=C5=9B?= Date: Wed, 22 May 2024 14:06:56 +0200 Subject: [PATCH] Add CI (#1) * Create elixir.yml * Update elixir.yml * Update elixir.yml * Removed gitlab ci configuration --- .github/workflows/elixir.yml | 48 +++++++++++++++++++ .gitlab-ci.yml | 26 ---------- .../segmentation/deeplab_v3/categories.json | 1 + models/segmentation/deeplab_v3/model.onnx | 3 ++ 4 files changed, 52 insertions(+), 26 deletions(-) create mode 100644 .github/workflows/elixir.yml delete mode 100644 .gitlab-ci.yml create mode 100644 models/segmentation/deeplab_v3/categories.json create mode 100644 models/segmentation/deeplab_v3/model.onnx diff --git a/.github/workflows/elixir.yml b/.github/workflows/elixir.yml new file mode 100644 index 0000000..d824990 --- /dev/null +++ b/.github/workflows/elixir.yml @@ -0,0 +1,48 @@ + # This workflow uses actions that are not certified by GitHub. +# They are provided by a third-party and are governed by +# separate terms of service, privacy policy, and support +# documentation. + +name: Elixir CI + +on: + push: + branches: [ "main" ] + pull_request: + branches: [ "main" ] + +permissions: + contents: read + +jobs: + build: + name: Build and test + runs-on: ubuntu-latest + + steps: + - uses: actions/checkout@v4 + - name: Set up Elixir + uses: erlef/setup-beam@61e01a43a562a89bfc54c7f9a378ff67b03e4a21 # v1.16.0 + with: + elixir-version: '1.16.2' # [Required] Define the Elixir version + otp-version: '26.0' # [Required] Define the Erlang/OTP version + - name: brndnmtthws/rust-action-rustup + uses: brndnmtthws/rust-action-rustup@v1.0.0 + - name: Restore dependencies cache + uses: actions/cache@v3 + with: + path: deps + key: ${{ runner.os }}-mix-${{ hashFiles('**/mix.lock') }} + restore-keys: ${{ runner.os }}-mix- + - name: Checkout LFS + uses: nschloe/action-cached-lfs-checkout@v1.1.2 + - name: Install dependencies + run: mix deps.get && mix deps.compile + - name: Checks if compiles without warning + run: mix compile --warnings-as-errors + - name: Run tests + run: mix test + - name: Run Credo + run: mix credo + - name: Test formatting + run: mix format --check-formatted diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml deleted file mode 100644 index 1731d8c..0000000 --- a/.gitlab-ci.yml +++ /dev/null @@ -1,26 +0,0 @@ -default: - image: elixir:latest - before_script: - - mix local.hex --force - - mix local.rebar --force - - mix deps.get - - curl -sSf https://sh.rustup.rs | sh -s -- -y - - source $HOME/.cargo/env - - rustup default stable - -build: - stage: build - - script: - - mix compile - - mix deps.compile - -test: - stage: test - - script: - - mix compile --warnings-as-errors - - mix credo - -variables: - MIX_ENV: test diff --git a/models/segmentation/deeplab_v3/categories.json b/models/segmentation/deeplab_v3/categories.json new file mode 100644 index 0000000..046fc9a --- /dev/null +++ b/models/segmentation/deeplab_v3/categories.json @@ -0,0 +1 @@ +["__background__", "aeroplane", "bicycle", "bird", "boat", "bottle", "bus", "car", "cat", "chair", "cow", "diningtable", "dog", "horse", "motorbike", "person", "pottedplant", "sheep", "sofa", "train", "tvmonitor"] \ No newline at end of file diff --git a/models/segmentation/deeplab_v3/model.onnx b/models/segmentation/deeplab_v3/model.onnx new file mode 100644 index 0000000..3b699d3 --- /dev/null +++ b/models/segmentation/deeplab_v3/model.onnx @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:d6043d375e83b91793acb86af7ef37783405814e4c03fc8e9d02dcb44beb75ea +size 44111008