diff --git a/.github/workflows/crystal.yml b/.github/workflows/crystal.yml new file mode 100644 index 0000000..502a91c --- /dev/null +++ b/.github/workflows/crystal.yml @@ -0,0 +1,33 @@ +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 + - name: Install wget + run: sudo apt-get install wget + - 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 + diff --git a/.github/workflows/deploy_docs.yml b/.github/workflows/deploy_docs.yml new file mode 100644 index 0000000..6d1a189 --- /dev/null +++ b/.github/workflows/deploy_docs.yml @@ -0,0 +1,35 @@ +name: Deploy Docs + +on: + push: + branches: + - master + tags: + - v* + paths-ignore: + - "CHANGELOG.md" +jobs: + deploy: + runs-on: ubuntu-16.04 + + steps: + - uses: actions/checkout@v2 + - uses: MeilCli/setup-crystal-action@v4.0.1 + with: + crystal_version: 1.0.0 + shards_version: 0.14.1 + - name: Install dependencies + run: shards install + - name: Run crystal doc + run: crystal doc + - name: Extract branch name + shell: bash + run: echo "##[set-output name=branch;]$(echo ${GITHUB_REF#refs/heads/})" + id: extract_branch + - name: Deploy to gh-pages + uses: peaceiris/actions-gh-pages@v3.7.0-8 + with: + personal_token: ${{ secrets.GITHUB_TOKEN }} + publish_dir: docs + destination_dir: ${{ steps.extract_branch.outputs.branch }} + diff --git a/README.md b/README.md index 463a470..6ab5ae2 100644 --- a/README.md +++ b/README.md @@ -61,7 +61,6 @@ Crystal bindings for the [libsodium API](https://libsodium.gitbook.io/doc/) - [x] Fast. Benchmarks available in `benchmarks`. - [x] [Most classes are safe to share between threads.](THREAD_SAFETY.md) - [x] Tested with real crystal threads and will continue to work when crystal officially supports threading. - - [x] Most classes are safe to share between threads. Even - [ ] Controlled memory wiping (by calling `.close`) ☑ Indicate specs are compared against test vectors from another source.