2021-06-01 10:49:19 +02:00
|
|
|
name: Crystal CI
|
|
|
|
|
|
|
|
on:
|
|
|
|
push:
|
|
|
|
branches: [ master ]
|
|
|
|
pull_request:
|
|
|
|
branches: [ master ]
|
|
|
|
|
|
|
|
jobs:
|
|
|
|
build:
|
|
|
|
runs-on: ubuntu-latest
|
|
|
|
|
|
|
|
container:
|
|
|
|
image: crystallang/crystal
|
|
|
|
|
|
|
|
steps:
|
|
|
|
- uses: actions/checkout@v2
|
2021-06-01 19:13:28 +02:00
|
|
|
- name: apt update
|
|
|
|
run: apt update
|
|
|
|
- name: Install lsb_release
|
|
|
|
run: apt-get install -y lsb-release
|
|
|
|
- name: lsb_release
|
|
|
|
run: lsb_release -a
|
2021-06-01 10:49:19 +02:00
|
|
|
- name: Install wget
|
2021-06-01 19:13:28 +02:00
|
|
|
run: apt-get install -y wget
|
2021-06-01 10:49:19 +02:00
|
|
|
- name: setenv DEBUG
|
|
|
|
run: echo "SODIUM_BUILD_DEBUG=1" >> $GITHUB_ENV
|
|
|
|
- name: setenv BUILD_DIR
|
|
|
|
run: echo "LIBSODIUM_BUILD_DIR=$HOME/libsodium" >> $GITHUB_ENV
|
|
|
|
- name: Install dependencies
|
|
|
|
run: shards install
|
|
|
|
- name: Run tests
|
|
|
|
run: crystal spec -Dpreview_mt --order random --error-on-warnings
|
|
|
|
- name: Run bulid
|
|
|
|
run: shards build -Dpreview_mt
|
|
|
|
- name: Run format
|
|
|
|
run: crystal tool format --check
|
2021-06-01 19:13:28 +02:00
|
|
|
- name: Failed
|
|
|
|
if: ${{ failure() }}
|
|
|
|
run: "[ -f libsodium_install.out ] && cat libsodium_install.out"
|
2021-06-01 10:49:19 +02:00
|
|
|
|