Skip to content

Commit

Permalink
ci: see if setup-nim is faster than choosenim (#70)
Browse files Browse the repository at this point in the history
  • Loading branch information
alaviss authored Jan 8, 2021
1 parent 0c7769e commit ea18f85
Showing 1 changed file with 19 additions and 24 deletions.
43 changes: 19 additions & 24 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:
- uses: actions/setup-node@v2
- name: Checkout fusion
Expand All @@ -49,6 +54,7 @@ jobs:

- name: Install dependencies (Linux i386)
if: runner.os == 'Linux' && matrix.target.cpu == 'i386'
working-directory: ${{ github.workspace }}
run: |
sudo dpkg --add-architecture i386
sudo apt-fast update -qq
Expand All @@ -71,15 +77,15 @@ jobs:
chmod 755 external/bin/gcc external/bin/g++
echo "${{ github.workspace }}/external/bin" >> "${GITHUB_PATH}"
echo "$PWD/external/bin" >> "${GITHUB_PATH}"
# - name: Install dependencies (macOS)
# if: runner.os == 'macOS'
# run: brew install <packages here>

- name: Install dependencies (Windows)
if: runner.os == 'Windows'
shell: bash
working-directory: ${{ github.workspace }}
run: |
mkdir external
if [[ '${{ matrix.target.cpu }}' == 'amd64' ]]; then
Expand All @@ -88,35 +94,24 @@ 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}"
cygpath -aw "external/mingw$arch/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 }}
architecture: ${{ matrix.target.cpu }}

- 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 Down

0 comments on commit ea18f85

Please sign in to comment.