Skip to content

CI

CI #911

Workflow file for this run

name: CI
'on':
push:
branches:
- github*
- master
tags:
- '*'
pull_request:
branches:
- '**'
schedule:
- cron: 0 0 * * *
jobs:
ci:
timeout-minutes: 30
strategy:
fail-fast: false
matrix:
otp_vsn:
- 'slim'
- '27-slim'
- '26.2-slim'
- '26.1-slim'
- '26-slim'
- '25.3-slim'
- '25.2-slim'
- '25.1-slim'
- '25-slim'
- '24.3-slim'
- '24.2-slim'
- '24.1-slim'
- '24.0-slim'
- '23.3-slim'
- '23.2-slim'
- '23.1-slim'
- '23-slim'
- '22.3-slim'
- '22.2-slim'
- '22-slim'
- '21.3-slim'
# NOTE testing disabled for the following versions, as the Docker image is based on Debian 9 (EOL) and
# either git depends on libpcre2-8-0 but it is not installable
# either actions/checkout's nodejs20 depends on a newer libc
# NOTE jesse might still be OTP-compatible though
# - '22.1-slim'
# - '21.2-slim'
# - '21.1-slim'
# - '21-slim'
# - '20.3-slim'
# - '19.3-slim'
# - '19.2-slim'
# - '19.1-slim'
# - '19-slim'
# - '18.2-slim'
# - '18.1-slim'
# - '18-slim'
name: 'ci-erl:${{ matrix.otp_vsn }}'
runs-on: ubuntu-latest
container:
image: 'erlang:${{ matrix.otp_vsn }}'
steps:
- shell: bash
run: |
# NOTE sync with ./Dockerfile.build.sh
apt-get -y update
apt-get -y install curl git make
- uses: actions/checkout@v4
with:
fetch-depth: 0
submodules: true
# https://github.com/actions/runner/issues/2033
# https://github.com/actions/checkout/issues/766
- shell: bash
run: |
chown -R "$(id -u):$(id -g)" "${GITHUB_WORKSPACE}"
git config --global --add safe.directory "${GITHUB_WORKSPACE}"
- shell: bash
run: make
- shell: bash
run: make test
- if: ${{ matrix.otp_vsn == 'slim' }}
shell: bash
run: make check docs
# PUBLISH TAGS
- if: ${{ startsWith(github.ref, 'refs/tags/') }}
name: Check is-semver-tag
id: is-semver-tag
shell: bash
run: |
if [[ ${{ github.event.ref }} =~ ^refs/tags/[0-9]+\.[0-9]+\.[0-9]+ ]]; then
echo "check=true" >> $GITHUB_OUTPUT
fi
- if: ${{ matrix.otp_vsn == 'slim' && steps.is-semver-tag.outputs.check == 'true'}}
name: Run make publish
shell: bash
env:
HEX_API_KEY: ${{secrets.HEX_API_KEY}}
run: |
mkdir -p ~/.config/rebar3
echo "{plugins, [rebar3_hex]}." > ~/.config/rebar3/rebar.config
make publish