Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ci: see if setup-nim is faster than choosenim #70

Merged
merged 2 commits into from
Jan 8, 2021
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
49 changes: 14 additions & 35 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,7 @@ jobs:
strategy:
fail-fast: false
matrix:
# xxx update as needed with latest stable for each branch
branch: ["1.0.8", "1.2.8", "1.4.2", "devel"] # stable currentl at 1.4.2
branch: [version-1-0, version-1-2, version-1-4, devel]
target:
- os: linux
cpu: amd64
Expand All @@ -34,6 +33,12 @@ jobs:
builder: windows-2019
name: '${{ matrix.target.os }}-${{ matrix.target.cpu }} (${{ matrix.branch }})'
runs-on: ${{ matrix.builder }}

defaults:
run:
shell: bash
working-directory: fusion

steps:
- name: Checkout fusion
uses: actions/checkout@v2
Expand Down Expand Up @@ -87,35 +92,23 @@ jobs:
arch=32
fi
curl -L "https://nim-lang.org/download/mingw$arch-6.3.0.7z" -o "external/mingw$arch.7z"
curl -L "https://nim-lang.org/download/windeps.zip" -o external/windeps.zip
7z x "external/mingw$arch.7z" -oexternal/
7z x external/windeps.zip -oexternal/dlls

echo "${{ github.workspace }}/external/mingw$arch/bin" >> "${GITHUB_PATH}"
echo "${{ github.workspace }}/external/dlls" >> "${GITHUB_PATH}"

- name: Setup environment
shell: bash
run: echo "${{ github.workspace }}/nim/bin" >> "${GITHUB_PATH}"

- name: Setup Nim
uses: jiro4989/setup-nim-action@v1
uses: alaviss/setup-nim@0.1.1
with:
nim-version: ${{ matrix.branch }}
no-color: true # --noColor
yes: true # --yes
path: nim
version: ${{ matrix.branch }}

- name: Run fusion tests
- name: Run tests
shell: bash
run: |
cd fusion
nimble test
run: nimble test

- name: docs
- name: Build docs
if: matrix.branch == 'devel'
run: |
cd fusion
nimble docs
run: nimble docs

- name: Deploy docs
# to view docs on your own fork: push a gh-pages branch on your fork,
Expand All @@ -131,17 +124,3 @@ jobs:
target_branch: gh-pages
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

- name: Cache choosenim
id: cache-choosenim
uses: actions/cache@v1
with:
path: ~/.choosenim
key: ${{ runner.os }}-choosenim-devel-latest

- name: Cache nimble
id: cache-nimble
uses: actions/cache@v1
with:
path: ~/.nimble
key: ${{ runner.os }}-nimble-devel-latest