Regenerate build artifacts. #1
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: Build | |
on: [push, pull_request] | |
jobs: | |
build: | |
if: | | |
!contains(github.event.head_commit.message, '[skip ci]') | |
strategy: | |
fail-fast: true | |
matrix: | |
platform: [ubuntu-latest] | |
python-version: ["3.5", "3.6", "3.7", "3.8", "3.9", "3.10"] | |
architecture: ["x64", "x86"] | |
nim-channel: [stable, devel] | |
name: ${{ matrix.platform }}-${{ matrix.architecture }}-${{ matrix.python-version }}-${{ matrix.nim-channel }} | |
runs-on: ${{ matrix.platform }} | |
steps: | |
- uses: actions/checkout@v2 | |
- name: Set Environment Variables | |
uses: allenevans/[email protected] | |
with: | |
ACTIONS_ALLOW_UNSECURE_COMMANDS: true | |
CMD: "nim doc -d:nimStrictDelete -d:nimPreviewFloatRoundtrip -d:nimPreviewDotLikeOps --gc:orc --index:on --project --experimental:strictEffects --experimental:strictFuncs --styleCheck:usages --styleCheck:hint --outdir:../../docs" | |
- uses: actions/setup-python@v2 | |
with: | |
python-version: ${{ matrix.python-version }} | |
- uses: jiro4989/[email protected] | |
with: | |
nim-version: ${{ matrix.nim-channel }} | |
no-color: true | |
- name: Get Git Commit Short Hash | |
id: vars | |
shell: bash | |
run: | | |
echo "sha_short=$(git rev-parse --short HEAD)" >> $GITHUB_ENV | |
echo "semver_date=$(date +'%y.%m.%d')" >> $GITHUB_ENV | |
- name: Nimble Install dependencies | |
run: | | |
nimble -y refresh | |
nimble -y install nimpy | |
pip install nimporter | |
- name: Build docs | |
shell: bash | |
run: | | |
cd faster_than_requests/ | |
for i in *.nim; do | |
$CMD $i | |
done | |
- name: Clean out | |
shell: bash | |
run: | | |
rm --verbose --force --recursive docs/*.idx | |
rm --verbose --force --recursive docs/nimcache/*.* | |
rm --verbose --force --recursive docs/nimcache/runnableExamples/*.* | |
- name: Commit Docs | |
if: | | |
github.event_name == 'push' && runner.os == 'Linux' && | |
matrix.platform == 'ubuntu-latest' && matrix.architecture == 'x64' && matrix.python-version == '3.10' | |
uses: EndBug/add-and-commit@v4 # Commit everything to Git repo | |
with: | |
add: 'docs' | |
force: true | |
message: 'Fully Automated Luxury Nim' | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} |