ecrecover/.circleci/config.yml
2023-01-13 17:01:16 +01:00

92 lines
2.0 KiB
YAML

version: 2.1
executors:
ubuntu_2004:
docker:
- image: circleci/buildpack-deps:20.04
macos_1106:
macos:
xcode: "13.2.1"
commands:
setup_ubuntu:
description: "Setup Ubuntu environment"
parameters:
OTP_VERSION:
type: string
steps:
- run:
name: Setup environment
command: |
sudo apt-get update \
&& sudo apt-get \
install \
build-essential \
autoconf \
libncurses5-dev
- run:
name: Install OTP
command: |
curl -fsSL -o otp-src.tar.gz https://github.com/erlang/otp/archive/OTP-<< parameters.OTP_VERSION >>.tar.gz
tar -zxf otp-src.tar.gz --strip-components=1
./otp_build autoconf && ./configure && make -j$(nproc) && sudo make install
setup_macos:
description: "Setup macos environment"
parameters:
OTP_VERSION:
type: string
steps:
- run:
name: Setup environment
command: |
brew update
brew install erlang@<< parameters.OTP_VERSION >>
brew link --force erlang@<< parameters.OTP_VERSION >>
run_build:
description: "Build"
steps:
- run:
name: Build
command: |
make
jobs:
ubuntu_2004_otp21:
executor: ubuntu_2004
steps:
- checkout
- setup_ubuntu:
OTP_VERSION: "21.3.8.24"
- run_build
ubuntu_2004_otp22:
executor: ubuntu_2004
steps:
- checkout
- setup_ubuntu:
OTP_VERSION: "22.3.4.26"
- run_build
ubuntu_2004_otp23:
executor: ubuntu_2004
steps:
- checkout
- setup_ubuntu:
OTP_VERSION: "23.3.4.18"
- run_build
macos_1106_otp23:
executor: macos_1106
steps:
- checkout
- setup_macos:
OTP_VERSION: "23"
- run_build
workflows:
check:
jobs:
- ubuntu_2004_otp21
- ubuntu_2004_otp22
- ubuntu_2004_otp23
- macos_1106_otp23