From 68808000c8e785f4a5428bc474e7a06941293956 Mon Sep 17 00:00:00 2001 From: sando38 Date: Fri, 2 Jun 2023 19:36:37 +0200 Subject: [PATCH] Add macos CI action --- .github/workflows/macos.yml | 72 +++++++++++++++++++++++++++++++++++++ 1 file changed, 72 insertions(+) create mode 100644 .github/workflows/macos.yml diff --git a/.github/workflows/macos.yml b/.github/workflows/macos.yml new file mode 100644 index 000000000..f2c27eb4f --- /dev/null +++ b/.github/workflows/macos.yml @@ -0,0 +1,72 @@ +name: CI | macOS + +on: + push: + paths-ignore: + - '*.md' + - 'doc/**' + - 'docker-k8s/**' + - 'windows/**' + pull_request: + paths-ignore: + - '*.md' + - 'doc/**' + - 'docker-k8s/**' + - 'windows/**' + +jobs: + installer: + name: macOS-${{ matrix.macos_vsn }} with homebrew + runs-on: macos-${{ matrix.macos_vsn }} + strategy: + matrix: + macos_vsn: [11, 12, 13] + + steps: + - name: Check out repository code + uses: actions/checkout@v3 + with: # For scripts/get-version: + fetch-depth: 0 + - name: Install dependencies + run: | + brew update + brew install \ + erlang \ + openssl \ + libyaml \ + rebar3 + - name: Cache Rebar data + uses: actions/cache@v3 + with: + path: ~/.cache/rebar3 + key: ${{ runner.os }}-${{ hashFiles('rebar.config') }} + # Until https://github.com/erlware/relx/issues/905 is fixed: + - name: Create Erlang cookie + run: erl -noinput -sname cookie -eval 'halt()' + - name: Download dependencies + run: rebar3 get-deps + - name: Compile code + env: + LDFLAGS: -L/usr/local/opt/openssl/lib -L/usr/local/lib + CFLAGS: -I/usr/local/opt/openssl/include/ -I/usr/local/include + CPPFLAGS: -I/usr/local/opt/openssl/include/ -I/usr/local/include + run: rebar3 compile + - name: Build release + run: rebar3 release + - name: Start release + run: _build/default/rel/eturnal/bin/eturnal daemon + - name: Ping release + run: _build/default/rel/eturnal/bin/eturnal ping + - name: Stop release + run: _build/default/rel/eturnal/bin/eturnal stop + - name: Analyze cross references + run: rebar3 xref + - name: Perform static code analysis + run: rebar3 dialyzer + - name: Run black-box tests (CT) + run: rebar3 ct || rebar3 ct + shell: bash + - name: Run white-box tests (EUnit) + run: rebar3 eunit + - name: Check test coverage + run: rebar3 cover