From d0bfa1b328ddf91f07b6c109ab163d7840b30d1f Mon Sep 17 00:00:00 2001 From: Thanabodee Charoenpiriyakij Date: Mon, 31 May 2021 09:20:50 +0700 Subject: [PATCH 1/5] Upgrade Elixir and OTP in GitHub Workflow This change do: * Add Elixir 1.12.1 and upgrade 1.11 to latest release. * Add OTP 24.0.1 and upgrade major OTP release to latest release. --- .github/workflows/elixir.yml | 22 ++++++++++++++-------- .github/workflows/erlang.yml | 4 ++-- 2 files changed, 16 insertions(+), 10 deletions(-) diff --git a/.github/workflows/elixir.yml b/.github/workflows/elixir.yml index f316e131..7f2a1ed3 100644 --- a/.github/workflows/elixir.yml +++ b/.github/workflows/elixir.yml @@ -15,8 +15,8 @@ jobs: - uses: actions/checkout@v2 - uses: erlef/setup-elixir@v1 with: - otp-version: '23.1' - elixir-version: '1.11.1' + otp-version: '24.0.1' + elixir-version: '1.12.1' - uses: actions/cache@v2 name: Cache with: @@ -33,9 +33,12 @@ jobs: name: Test on Elixir ${{ matrix.elixir_version }} (OTP ${{ matrix.otp_version }}) and ${{ matrix.os }} strategy: matrix: - otp_version: ['23.1', '22.3.4.2', '21.3.8.16'] - elixir: ['1.11.1'] + otp_version: ['24.0.1', '23.3.4.1', '22.3.4.19', '21.3.8.23'] + elixir: ['1.12.1', '1.11.4'] os: [ubuntu-18.04] + exclude: + - otp_version: '21.3.8.23' + elixir: '1.12.1' env: OTP_VERSION: ${{ matrix.otp_version }} ELIXIR_VERSION: ${{ matrix.elixir }} @@ -56,9 +59,12 @@ jobs: name: Test on Elixir ${{ matrix.elixir_version }} (OTP ${{ matrix.otp_version }}) and ${{ matrix.os }} strategy: matrix: - otp_version: ['23.1', '22.3.4.2', '21.3.8.16'] - elixir: ['1.11.1'] + otp_version: ['24.0.1', '23.3.4.1', '22.3.4.19', '21.3.8.23'] + elixir: ['1.12.1', '1.11.4'] os: [ubuntu-18.04] + exclude: + - otp_version: '21.3.8.23' + elixir: '1.12.1' env: OTP_VERSION: ${{ matrix.otp_version }} ELIXIR_VERSION: ${{ matrix.elixir }} @@ -96,8 +102,8 @@ jobs: name: Dialyze on Elixir ${{ matrix.elixir_version }} (OTP ${{ matrix.otp_version }}) and ${{ matrix.os }} strategy: matrix: - otp_version: ['23.1'] - elixir: ['1.11.1'] + otp_version: ['24.0.1'] + elixir: ['1.12.1'] os: [ubuntu-18.04] env: OTP_VERSION: ${{ matrix.otp_version }} diff --git a/.github/workflows/erlang.yml b/.github/workflows/erlang.yml index 699b6522..d224a0d4 100644 --- a/.github/workflows/erlang.yml +++ b/.github/workflows/erlang.yml @@ -14,7 +14,7 @@ jobs: runs-on: ${{ matrix.os }} strategy: matrix: - otp_version: ['23.0.2', '22.3.4.2', '21.3.8.16'] + otp_version: ['24.0.1', '23.3.4.1', '22.3.4.19', '21.3.8.23'] os: [ubuntu-18.04] env: OTP_VERSION: ${{ matrix.otp_version }} @@ -69,7 +69,7 @@ jobs: runs-on: ${{ matrix.os }} strategy: matrix: - otp_version: ['23.0.2', '22.3.4.2', '21.3.8.16'] + otp_version: ['24.0.1', '23.3.4.1', '22.3.4.19', '21.3.8.23'] os: [ubuntu-18.04] steps: - uses: actions/checkout@v2 From 933a678c1b4b9239e3feadc7bb25262e79239ef2 Mon Sep 17 00:00:00 2001 From: Thanabodee Charoenpiriyakij Date: Tue, 1 Jun 2021 21:17:24 +0700 Subject: [PATCH 2/5] Use include with specific rebar3 version with OTP 21, upgrade OTP 24 rebar3 v3.16.1 ship support OTP 22+, this cause ci fail on OTP 21. Fixes by using rebar3 v3.15.2 with OTP 21 and add it with include matrix instead. In this changes, upgrade OTP 24 from 24.0.1 to 24.0.2 and change setup-elixir to setup-beam instead. --- .github/workflows/elixir.yml | 26 +++++++++++++++++++------- .github/workflows/erlang.yml | 20 +++++++++++++++----- 2 files changed, 34 insertions(+), 12 deletions(-) diff --git a/.github/workflows/elixir.yml b/.github/workflows/elixir.yml index 7f2a1ed3..46628ea5 100644 --- a/.github/workflows/elixir.yml +++ b/.github/workflows/elixir.yml @@ -13,7 +13,7 @@ jobs: runs-on: ubuntu-18.04 steps: - uses: actions/checkout@v2 - - uses: erlef/setup-elixir@v1 + - uses: erlef/setup-beam@v1 with: otp-version: '24.0.1' elixir-version: '1.12.1' @@ -33,9 +33,14 @@ jobs: name: Test on Elixir ${{ matrix.elixir_version }} (OTP ${{ matrix.otp_version }}) and ${{ matrix.os }} strategy: matrix: - otp_version: ['24.0.1', '23.3.4.1', '22.3.4.19', '21.3.8.23'] + otp_version: ['24.0.2', '23.3.4.1', '22.3.4.19'] elixir: ['1.12.1', '1.11.4'] + rebar3_version: ['3.16.1'] os: [ubuntu-18.04] + include: + - otp_version: '21.3.8.23' + elixir_version: '1.11.4' + rebar3_version: '3.15.2' exclude: - otp_version: '21.3.8.23' elixir: '1.12.1' @@ -45,10 +50,11 @@ jobs: OTEL_TRACES_EXPORTER: "none" steps: - uses: actions/checkout@v2 - - uses: erlef/setup-elixir@v1 + - uses: erlef/setup-beam@v1 with: otp-version: ${{ matrix.otp_version }} elixir-version: ${{ matrix.elixir }} + rebar3-version: ${{ matrix.rebar3_version }} - name: Compile run: rebar3 as test compile - name: ExUnit @@ -59,9 +65,14 @@ jobs: name: Test on Elixir ${{ matrix.elixir_version }} (OTP ${{ matrix.otp_version }}) and ${{ matrix.os }} strategy: matrix: - otp_version: ['24.0.1', '23.3.4.1', '22.3.4.19', '21.3.8.23'] + otp_version: ['24.0.2', '23.3.4.1', '22.3.4.19'] elixir: ['1.12.1', '1.11.4'] + rebar3_version: ['3.16.1'] os: [ubuntu-18.04] + include: + - otp_version: '21.3.8.23' + elixir_version: '1.11.4' + rebar3_version: '3.15.2' exclude: - otp_version: '21.3.8.23' elixir: '1.12.1' @@ -73,10 +84,11 @@ jobs: working-directory: apps/opentelemetry_api/ steps: - uses: actions/checkout@v2 - - uses: erlef/setup-elixir@v1 + - uses: erlef/setup-beam@v1 with: otp-version: ${{ matrix.otp_version }} elixir-version: ${{ matrix.elixir }} + rebar3-version: ${{ matrix.rebar3_version }} - uses: actions/cache@v2 name: Cache with: @@ -102,7 +114,7 @@ jobs: name: Dialyze on Elixir ${{ matrix.elixir_version }} (OTP ${{ matrix.otp_version }}) and ${{ matrix.os }} strategy: matrix: - otp_version: ['24.0.1'] + otp_version: ['24.0.2'] elixir: ['1.12.1'] os: [ubuntu-18.04] env: @@ -113,7 +125,7 @@ jobs: working-directory: apps/opentelemetry_api/ steps: - uses: actions/checkout@v2 - - uses: erlef/setup-elixir@v1 + - uses: erlef/setup-beam@v1 with: otp-version: ${{ matrix.otp_version }} elixir-version: ${{ matrix.elixir }} diff --git a/.github/workflows/erlang.yml b/.github/workflows/erlang.yml index d224a0d4..762096cf 100644 --- a/.github/workflows/erlang.yml +++ b/.github/workflows/erlang.yml @@ -14,8 +14,12 @@ jobs: runs-on: ${{ matrix.os }} strategy: matrix: - otp_version: ['24.0.1', '23.3.4.1', '22.3.4.19', '21.3.8.23'] + otp_version: ['24.0.2', '23.3.4.1', '22.3.4.19'] + rebar3_version: ['3.16.1'] os: [ubuntu-18.04] + include: + - otp_version: '21.3.8.23' + rebar3_version: '3.15.2' env: OTP_VERSION: ${{ matrix.otp_version }} OTEL_TRACES_EXPORTER: "none" @@ -23,9 +27,10 @@ jobs: - uses: actions/checkout@v2 - name: Run Collector run: docker-compose up -d - - uses: erlef/setup-elixir@v1 + - uses: erlef/setup-beam@v1 with: otp-version: ${{ matrix.otp_version }} + rebar3-version: ${{ matrix.rebar3_version }} elixir-version: '1.11.1' - uses: actions/cache@v2 name: Cache @@ -69,14 +74,19 @@ jobs: runs-on: ${{ matrix.os }} strategy: matrix: - otp_version: ['24.0.1', '23.3.4.1', '22.3.4.19', '21.3.8.23'] + otp_version: ['24.0.2', '23.3.4.1', '22.3.4.19'] + rebar3_version: ['3.16.1'] os: [ubuntu-18.04] + include: + - otp_version: '21.3.8.23' + rebar3_version: '3.15.2' steps: - uses: actions/checkout@v2 - - uses: erlef/setup-elixir@v1 + - uses: erlef/setup-beam@v1 with: otp-version: ${{ matrix.otp_version }} - elixir-version: '1.11.1' + rebar3-version: ${{ matrix.rebar3_version }} + elixir-version: '1.12.1' - uses: actions/cache@v2 name: Cache with: From 92009f291c7d49ae6cc73ca1b1cbfe22d02bcaa5 Mon Sep 17 00:00:00 2001 From: Thanabodee Charoenpiriyakij Date: Tue, 1 Jun 2021 21:25:10 +0700 Subject: [PATCH 3/5] Upgrade OTP 21,22,23 --- .github/workflows/elixir.yml | 12 ++++++------ .github/workflows/erlang.yml | 8 ++++---- 2 files changed, 10 insertions(+), 10 deletions(-) diff --git a/.github/workflows/elixir.yml b/.github/workflows/elixir.yml index 46628ea5..44582746 100644 --- a/.github/workflows/elixir.yml +++ b/.github/workflows/elixir.yml @@ -33,16 +33,16 @@ jobs: name: Test on Elixir ${{ matrix.elixir_version }} (OTP ${{ matrix.otp_version }}) and ${{ matrix.os }} strategy: matrix: - otp_version: ['24.0.2', '23.3.4.1', '22.3.4.19'] + otp_version: ['24.0.2', '23.3.4.2', '22.3.4.20'] elixir: ['1.12.1', '1.11.4'] rebar3_version: ['3.16.1'] os: [ubuntu-18.04] include: - - otp_version: '21.3.8.23' + - otp_version: '21.3.8.24' elixir_version: '1.11.4' rebar3_version: '3.15.2' exclude: - - otp_version: '21.3.8.23' + - otp_version: '21.3.8.24' elixir: '1.12.1' env: OTP_VERSION: ${{ matrix.otp_version }} @@ -65,16 +65,16 @@ jobs: name: Test on Elixir ${{ matrix.elixir_version }} (OTP ${{ matrix.otp_version }}) and ${{ matrix.os }} strategy: matrix: - otp_version: ['24.0.2', '23.3.4.1', '22.3.4.19'] + otp_version: ['24.0.2', '23.3.4.2', '22.3.4.20'] elixir: ['1.12.1', '1.11.4'] rebar3_version: ['3.16.1'] os: [ubuntu-18.04] include: - - otp_version: '21.3.8.23' + - otp_version: '21.3.8.24' elixir_version: '1.11.4' rebar3_version: '3.15.2' exclude: - - otp_version: '21.3.8.23' + - otp_version: '21.3.8.24' elixir: '1.12.1' env: OTP_VERSION: ${{ matrix.otp_version }} diff --git a/.github/workflows/erlang.yml b/.github/workflows/erlang.yml index 762096cf..cf0509c8 100644 --- a/.github/workflows/erlang.yml +++ b/.github/workflows/erlang.yml @@ -14,11 +14,11 @@ jobs: runs-on: ${{ matrix.os }} strategy: matrix: - otp_version: ['24.0.2', '23.3.4.1', '22.3.4.19'] + otp_version: ['24.0.2', '23.3.4.2', '22.3.4.20'] rebar3_version: ['3.16.1'] os: [ubuntu-18.04] include: - - otp_version: '21.3.8.23' + - otp_version: '21.3.8.24' rebar3_version: '3.15.2' env: OTP_VERSION: ${{ matrix.otp_version }} @@ -74,11 +74,11 @@ jobs: runs-on: ${{ matrix.os }} strategy: matrix: - otp_version: ['24.0.2', '23.3.4.1', '22.3.4.19'] + otp_version: ['24.0.2', '23.3.4.2', '22.3.4.20'] rebar3_version: ['3.16.1'] os: [ubuntu-18.04] include: - - otp_version: '21.3.8.23' + - otp_version: '21.3.8.24' rebar3_version: '3.15.2' steps: - uses: actions/checkout@v2 From 432f7de55957b4e731a8864cd249bbadf95eed9e Mon Sep 17 00:00:00 2001 From: Thanabodee Charoenpiriyakij Date: Wed, 2 Jun 2021 09:22:46 +0700 Subject: [PATCH 4/5] Add os to matrix.include The ci will pass with error empty value on `runs-on`. The root cause is the field `os` needs to add to matrix.include. This change fix this issue. --- .github/workflows/elixir.yml | 2 ++ .github/workflows/erlang.yml | 2 ++ 2 files changed, 4 insertions(+) diff --git a/.github/workflows/elixir.yml b/.github/workflows/elixir.yml index 44582746..f19d10ee 100644 --- a/.github/workflows/elixir.yml +++ b/.github/workflows/elixir.yml @@ -41,6 +41,7 @@ jobs: - otp_version: '21.3.8.24' elixir_version: '1.11.4' rebar3_version: '3.15.2' + os: ubuntu-18.04 exclude: - otp_version: '21.3.8.24' elixir: '1.12.1' @@ -73,6 +74,7 @@ jobs: - otp_version: '21.3.8.24' elixir_version: '1.11.4' rebar3_version: '3.15.2' + os: ubuntu-18.04 exclude: - otp_version: '21.3.8.24' elixir: '1.12.1' diff --git a/.github/workflows/erlang.yml b/.github/workflows/erlang.yml index cf0509c8..904d9b46 100644 --- a/.github/workflows/erlang.yml +++ b/.github/workflows/erlang.yml @@ -20,6 +20,7 @@ jobs: include: - otp_version: '21.3.8.24' rebar3_version: '3.15.2' + os: ubuntu-18.04 env: OTP_VERSION: ${{ matrix.otp_version }} OTEL_TRACES_EXPORTER: "none" @@ -80,6 +81,7 @@ jobs: include: - otp_version: '21.3.8.24' rebar3_version: '3.15.2' + os: ubuntu-18.04 steps: - uses: actions/checkout@v2 - uses: erlef/setup-beam@v1 From 7194b7f34270064d6fb4678ddc0f6d8186204a04 Mon Sep 17 00:00:00 2001 From: Thanabodee Charoenpiriyakij Date: Wed, 2 Jun 2021 20:13:29 +0700 Subject: [PATCH 5/5] Fix build fail issues --- .github/workflows/elixir.yml | 30 +++++++++++++++--------------- .github/workflows/erlang.yml | 1 - 2 files changed, 15 insertions(+), 16 deletions(-) diff --git a/.github/workflows/elixir.yml b/.github/workflows/elixir.yml index f19d10ee..b6533398 100644 --- a/.github/workflows/elixir.yml +++ b/.github/workflows/elixir.yml @@ -34,7 +34,7 @@ jobs: strategy: matrix: otp_version: ['24.0.2', '23.3.4.2', '22.3.4.20'] - elixir: ['1.12.1', '1.11.4'] + elixir_version: ['1.12.1', '1.11.4'] rebar3_version: ['3.16.1'] os: [ubuntu-18.04] include: @@ -44,17 +44,17 @@ jobs: os: ubuntu-18.04 exclude: - otp_version: '21.3.8.24' - elixir: '1.12.1' + elixir_version: '1.12.1' env: OTP_VERSION: ${{ matrix.otp_version }} - ELIXIR_VERSION: ${{ matrix.elixir }} + ELIXIR_VERSION: ${{ matrix.elixir_version }} OTEL_TRACES_EXPORTER: "none" steps: - uses: actions/checkout@v2 - uses: erlef/setup-beam@v1 with: otp-version: ${{ matrix.otp_version }} - elixir-version: ${{ matrix.elixir }} + elixir-version: ${{ matrix.elixir_version }} rebar3-version: ${{ matrix.rebar3_version }} - name: Compile run: rebar3 as test compile @@ -67,7 +67,7 @@ jobs: strategy: matrix: otp_version: ['24.0.2', '23.3.4.2', '22.3.4.20'] - elixir: ['1.12.1', '1.11.4'] + elixir_version: ['1.12.1', '1.11.4'] rebar3_version: ['3.16.1'] os: [ubuntu-18.04] include: @@ -77,10 +77,10 @@ jobs: os: ubuntu-18.04 exclude: - otp_version: '21.3.8.24' - elixir: '1.12.1' + elixir_version: '1.12.1' env: OTP_VERSION: ${{ matrix.otp_version }} - ELIXIR_VERSION: ${{ matrix.elixir }} + ELIXIR_VERSION: ${{ matrix.elixir_version }} defaults: run: working-directory: apps/opentelemetry_api/ @@ -89,7 +89,7 @@ jobs: - uses: erlef/setup-beam@v1 with: otp-version: ${{ matrix.otp_version }} - elixir-version: ${{ matrix.elixir }} + elixir-version: ${{ matrix.elixir_version }} rebar3-version: ${{ matrix.rebar3_version }} - uses: actions/cache@v2 name: Cache @@ -97,9 +97,9 @@ jobs: path: | apps/opentelemetry_api/deps apps/opentelemetry_api/_build - key: ${{ runner.os }}-build-${{ matrix.otp_version }}-${{ matrix.elixir }}-v3-${{ hashFiles(format('{0}{1}', github.workspace, '/apps/opentelemetry_api/mix.lock')) }} + key: ${{ runner.os }}-build-${{ matrix.otp_version }}-${{ matrix.elixir_version }}-v3-${{ hashFiles(format('{0}{1}', github.workspace, '/apps/opentelemetry_api/mix.lock')) }} restore-keys: | - ${{ runner.os }}-build-${{ matrix.otp_version }}-${{ matrix.elixir }}- + ${{ runner.os }}-build-${{ matrix.otp_version }}-${{ matrix.elixir_version }}- - run: mix deps.get name: Deps - run: mix test --cover @@ -117,11 +117,11 @@ jobs: strategy: matrix: otp_version: ['24.0.2'] - elixir: ['1.12.1'] + elixir_version: ['1.12.1'] os: [ubuntu-18.04] env: OTP_VERSION: ${{ matrix.otp_version }} - ELIXIR_VERSION: ${{ matrix.elixir }} + ELIXIR_VERSION: ${{ matrix.elixir_version }} defaults: run: working-directory: apps/opentelemetry_api/ @@ -130,16 +130,16 @@ jobs: - uses: erlef/setup-beam@v1 with: otp-version: ${{ matrix.otp_version }} - elixir-version: ${{ matrix.elixir }} + elixir-version: ${{ matrix.elixir_version }} - uses: actions/cache@v2 name: Cache with: path: | apps/opentelemetry_api/deps apps/opentelemetry_api/_build - key: ${{ runner.os }}-dialyzer-${{ matrix.otp_version }}-${{ matrix.elixir }}-v3-${{ hashFiles('apps/opentelemetry_api/mix.lock') }} + key: ${{ runner.os }}-dialyzer-${{ matrix.otp_version }}-${{ matrix.elixir_version }}-v3-${{ hashFiles('apps/opentelemetry_api/mix.lock') }} restore-keys: | - ${{ runner.os }}-build-${{ matrix.otp_version }}-${{ matrix.elixir }}- + ${{ runner.os }}-build-${{ matrix.otp_version }}-${{ matrix.elixir_version }}- - run: mix deps.get name: Deps - run: mix dialyzer diff --git a/.github/workflows/erlang.yml b/.github/workflows/erlang.yml index 904d9b46..e421de22 100644 --- a/.github/workflows/erlang.yml +++ b/.github/workflows/erlang.yml @@ -88,7 +88,6 @@ jobs: with: otp-version: ${{ matrix.otp_version }} rebar3-version: ${{ matrix.rebar3_version }} - elixir-version: '1.12.1' - uses: actions/cache@v2 name: Cache with: