Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
80 changes: 0 additions & 80 deletions .cirrus.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,86 +9,6 @@ test_template: &DEFAULT_TEST_SETTINGS
# don't cancel the task execution if it's master or a release branch
auto_cancellation: $CIRRUS_BRANCH != 'master' && $CIRRUS_BRANCH !=~ 'v\d+\.\d+.*'

test_linux_task:
<<: *DEFAULT_TEST_SETTINGS

container:
image: buildpack-deps:trusty
cpu: 8
memory: 1536Mi

env:
PATH: "${CIRRUS_WORKING_DIR}/otp/bin:${PATH}"

matrix:
- name: Linux, ${OTP_RELEASE}, Ubuntu 14.04
alias: Linux Stable
matrix:
- env:
CHECK_POSIX_COMPLIANT: true
CHECK_REPRODUCIBLE: true
OTP_RELEASE: OTP-23.0
- env:
OTP_RELEASE: OTP-22.3
- env:
OTP_RELEASE: OTP-22.0
- env:
OTP_RELEASE: OTP-21.3.8
- env:
OTP_RELEASE: OTP-21.0

- name: Linux, OTP-${OTP_RELEASE}, development, Ubuntu 14.04
alias: Linux Development
allow_failures: true
skip_notifications: true
depends_on:
- Linux Stable
- FreeBSD Stable
matrix:
- env:
OTP_RELEASE: master
- env:
OTP_RELEASE: maint

install_script:
- wget -O otp.tar.gz https://repo.hex.pm/builds/otp/ubuntu-14.04/${OTP_RELEASE}.tar.gz
- mkdir -p otp
- tar zxf otp.tar.gz -C otp --strip-components=1
- otp/Install -minimal ${CIRRUS_WORKING_DIR}/otp
- rm -rf .git
- make compile

build_info_script: bin/elixir --version

test_formatted_script:
- make test_formatted &&
echo "All Elixir source code files are properly formatted."

dialyzer_script: dialyzer -pa lib/elixir/ebin --build_plt --output_plt elixir.plt --apps lib/elixir/ebin/elixir.beam lib/elixir/ebin/Elixir.Kernel.beam

test_erlang_script: make test_erlang

test_elixir_script: make test_elixir

check_posix_compliant_script: |
if [ -n "$CHECK_POSIX_COMPLIANT" ]; then
apt update
apt install -y shellcheck
shellcheck -e SC2039,2086 bin/elixir && echo "bin/elixir is POSIX compliant"
shellcheck bin/elixirc && echo "bin/elixirc is POSIX compliant"
shellcheck bin/iex && echo "bin/iex is POSIX compliant"
else
echo "The format of the shell scripts is only checked in the last stable Erlang/OTP version."
fi

check_reproducible_script: |
if [ -n "$CHECK_REPRODUCIBLE" ]; then
taskset 1 make check_reproducible
else
echo "The reproducibility of the build is only checked in the last stable Erlang/OTP version."
fi


test_windows_task:
<<: *DEFAULT_TEST_SETTINGS

Expand Down
70 changes: 70 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,70 @@
name: CI

on: [pull_request, push]

env:
ELIXIR_ASSERT_TIMEOUT: 2000
ELIXIRC_OPTS: "--warnings-as-errors"
ERLC_OPTS: "warnings_as_errors"
LANG: C.UTF-8

jobs:
test:
name: Linux, ${{ matrix.otp_release }}, Ubuntu 16.04
continue-on-error: ${{ matrix.development }}
strategy:
matrix:
otp_release: ['OTP-23.0', 'OTP-22.3', 'OTP-22.0', 'OTP-21.3.8', 'OTP-21.0']
development: [false]
include:
- otp_release: master
development: true
- otp_release: maint
development: true
runs-on: ubuntu-16.04
steps:
- uses: actions/checkout@v1
with:
fetch-depth: 50
- name: Install Erlang/OTP
run: |
cd $RUNNER_TEMP
wget -O otp.tar.gz https://repo.hex.pm/builds/otp/ubuntu-14.04/${{ matrix.otp_release }}.tar.gz
mkdir -p otp
tar zxf otp.tar.gz -C otp --strip-components=1
otp/Install -minimal $(pwd)/otp
echo "::add-path::$(pwd)/otp/bin"
- name: Compile Elixir
run: |
rm -rf .git
make compile
- name: Build info
run: bin/elixir --version
- name: Check format
run: make test_formatted && echo "All Elixir source code files are properly formatted."
- name: Dyalizer
run: dialyzer -pa lib/elixir/ebin --build_plt --output_plt elixir.plt --apps lib/elixir/ebin/elixir.beam lib/elixir/ebin/Elixir.Kernel.beam
- name: Erlang test suite
run: make test_erlang
- name: Elixir test suite
run: make test_elixir
- name: Check reproducible builds
run: taskset 1 make check_reproducible
if: matrix.otp_release == 'OTP-23.0'

check_posix_compliant:
name: Check POSIX-compliant
runs-on: ubuntu-16.04
steps:
- uses: actions/checkout@v1
with:
fetch-depth: 50
- name: Install Shellcheck
run: |
sudo apt update
sudo apt install -y shellcheck
- name: Check POSIX-compliant
run: |
shellcheck -e SC2039,2086 bin/elixir && echo "bin/elixir is POSIX compliant"
shellcheck bin/elixirc && echo "bin/elixirc is POSIX compliant"
shellcheck bin/iex && echo "bin/iex is POSIX compliant"