Make nsort
work as a library with newer glibc and newer Nim.
#146
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: CI | |
on: | |
#schedule: | |
# - cron: '30 5 * * *' | |
push: | |
branches: | |
- master | |
pull_request: | |
branches: | |
- '*' | |
jobs: | |
changes: | |
if: github.event_name != 'schedule' # Do not want to skip scheduled runs | |
continue-on-error: true # Ensure errors don't stop us | |
runs-on: ubuntu-latest | |
outputs: | |
src: ${{ steps.filter.outputs.src }} | |
steps: | |
- if: github.event_name != 'pull_request' # Github API path filter check=> | |
name: Checkout (if not PR) #..No need to checkout. | |
uses: actions/checkout@v2 | |
- uses: dorny/paths-filter@v2 | |
id: filter | |
with: | |
filters: | | |
src: | |
- '**.cfg' | |
- '**.nims' | |
- '**.nim' | |
- '**.nimble' | |
- 'tests/**' | |
- '.github/workflows/ci.yml' | |
build: | |
needs: changes # Build if cared-about files changed | |
# always() is needed here for the job to always run despite Github docs. | |
# See: https://github.com/actions/runner/issues/491 | |
if: always() && needs.changes.outputs.src != 'false' | |
strategy: | |
fail-fast: false | |
matrix: | |
os: ['ubuntu-latest'] | |
nim: ['version-2-0'] | |
name: '${{ matrix.os }} (${{ matrix.nim }})' | |
runs-on: ${{ matrix.os }} | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v2 | |
with: | |
path: ci | |
- name: Setup Nim | |
uses: alaviss/setup-nim@0.1.1 | |
with: | |
path: nim | |
version: ${{ matrix.nim }} | |
- name: Build docs | |
if: ${{ matrix.docs }} == 'true' | |
shell: bash | |
run: | | |
cd ci | |
branch=${{ github.ref }} | |
branch=${branch##*/} | |
nim doc --project --outdir:docs --path="." \ | |
'--git.url:https://github.com/${{ github.repository }}' \ | |
'--git.commit:${{ github.sha }}' \ | |
"--git.devel:$branch" \ | |
adix.nim | |
cp docs/{the,}index.html || true # Ignore failures for older Nim | |
- name: Publish docs | |
if: > | |
github.event_name == 'push' && github.ref == 'refs/heads/master' && | |
matrix.os == 'ubuntu-latest' && matrix.nim == 'version-2-0' | |
uses: crazy-max/ghaction-github-pages@v2.5.0 | |
with: | |
build_dir: ci/docs | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
success: # Set check-required on this | |
needs: build | |
runs-on: ubuntu-latest | |
name: 'All check passes' | |
steps: | |
- run: | | |
echo "This is a workaround for Github's broken software" |