Here are some benefits of moving to GitHub
Actions:
* The Docker image `fertapric/elixir-ci:*` is
no longer needed.
* Build times has been reduced ~50%: current
times are ~20 mins, and with GitHub Actions
~10 mins.
* Jobs seem to be scheduled faster: a few
seconds compared to minutes.
* Running instances seem more stable: I have
not experienced `ExUnit.TimeoutError` errors
nor memory allocation issues.
103 lines
3.3 KiB
YAML
103 lines
3.3 KiB
YAML
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_linux:
|
|
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'
|
|
|
|
test_windows:
|
|
name: Windows, OTP-${{ matrix.otp_release }}, Windows Server 2019
|
|
strategy:
|
|
matrix:
|
|
otp_release: ['22.0']
|
|
runs-on: windows-2019
|
|
steps:
|
|
- name: Configure Git
|
|
run: git config --global core.autocrlf input
|
|
- uses: actions/checkout@v1
|
|
with:
|
|
fetch-depth: 50
|
|
- name: Cache Erlang/OTP package
|
|
uses: actions/cache@v2
|
|
with:
|
|
path: C:\Users\runneradmin\AppData\Local\Temp\chocolatey\erlang
|
|
key: OTP-${{ matrix.otp_release }}-windows-2019
|
|
- name: Install Erlang/OTP
|
|
run: choco install -y erlang --version ${{ matrix.otp_release }}
|
|
- name: Compile Elixir
|
|
run: |
|
|
remove-item '.git' -recurse -force
|
|
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: Erlang test suite
|
|
run: make --keep-going test_erlang
|
|
- name: Elixir test suite
|
|
run: make --keep-going test_elixir
|
|
|
|
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"
|