ecrecover/.circleci/config.yml
2023-01-13 09:42:37 +02:00

114 lines
2.5 KiB
YAML

version: 2.1
executors:
ubuntu_1804:
docker:
- image: circleci/buildpack-deps:bionic
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 \
cargo \
cmake \
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
- run:
name: Install rest
command: |
curl https://sh.rustup.rs -sSf | sh -s -- -yq && source $HOME/.cargo/env
setup_macos:
description: "Setup macos environment"
parameters:
OTP_VERSION:
type: string
steps:
- run:
name: Setup environment
command: |
brew update
brew install rust cmake erlang@<< parameters.OTP_VERSION >>
brew link --force erlang@<< parameters.OTP_VERSION >>
run_build:
description: "Build"
steps:
- run:
name: Build
command: |
make
jobs:
ubuntu_1804_otp21:
executor: ubuntu_1804
steps:
- checkout
- setup_ubuntu:
OTP_VERSION: "21.3.8.24"
- run_build
ubuntu_1804_otp22:
executor: ubuntu_1804
steps:
- checkout
- setup_ubuntu:
OTP_VERSION: "22.3.4.26"
- run_build
ubuntu_1804_otp23:
executor: ubuntu_1804
steps:
- checkout
- setup_ubuntu:
OTP_VERSION: "23.3.4.18"
- run_build
macos_1106_otp21:
executor: macos_1106
steps:
- checkout
- setup_macos:
OTP_VERSION: "21"
- run_build
macos_1106_otp22:
executor: macos_1106
steps:
- checkout
- setup_macos:
OTP_VERSION: "22"
- run_build
macos_1106_otp22:
executor: macos_1106
steps:
- checkout
- setup_macos:
OTP_VERSION: "23"
- run_build
workflows:
check:
jobs:
- ubuntu_1804_otp21
- ubuntu_1804_otp22
- ubuntu_1804_otp23
- macos_1106_otp21
- macos_1106_otp22
- macos_1106_otp23