Skip to content

build(deps): bump actions/checkout from 3.5.2 to 4.0.0 #311

build(deps): bump actions/checkout from 3.5.2 to 4.0.0

build(deps): bump actions/checkout from 3.5.2 to 4.0.0 #311

Workflow file for this run

name: CI
on: [push, pull_request]
jobs:
build:
strategy:
fail-fast: false
matrix:
branch: [devel]
target: [linux, macos, windows]
arch: [i386, amd64]
include:
- target: linux
builder: ubuntu-20.04
- target: macos
builder: macos-11
- target: windows
builder: windows-2019
- target: linux
arch: amd64
branch: devel
pushdocs: true
exclude:
- target: macos
arch: i386
name: "${{ matrix.target }} on ${{ matrix.arch }} (Nim ${{ matrix.branch }})"
runs-on: ${{ matrix.builder }}
defaults:
run:
shell: bash
working-directory: nim-sys
steps:
- name: Checkout
uses: actions/checkout@v4.0.0
with:
path: nim-sys
submodules: "recursive"
- name: Configure Nim for 32 bit GCC (Linux-only)
if: matrix.arch == 'i386' && runner.os == 'Linux'
run: |
sudo dpkg --add-architecture i386
sudo apt-fast update -qq
sudo DEBIAN_FRONTEND='noninteractive' apt-fast install \
--no-install-recommends -yq gcc-multilib g++-multilib
mkdir -p ~/.config/nim
cat << EOF > ~/.config/nim/nim.cfg
gcc.options.always %= "\${gcc.options.always} -m32"
gcc.cpp.options.always %= "\${gcc.cpp.options.always} -m32"
gcc.options.linker %= "\${gcc.options.linker} -m32"
gcc.cpp.options.linker %= "\${gcc.cpp.options.linker} -m32"
EOF
- name: Install 32bit MinGW (Windows-only)
if: matrix.arch == 'i386' && runner.os == 'Windows'
uses: egor-tensin/setup-mingw@v2
with:
platform: x86
static: 0
- name: Setup Nim
uses: alaviss/setup-nim@0.1.1
with:
path: nim
version: ${{ matrix.branch }}
architecture: ${{ matrix.arch }}
- name: Install dependencies
run: nimble install -y --depsOnly
- name: Run tests
run: nimble test
- name: Build docs
shell: bash
run: |
branch=${{ github.ref }}
branch=${branch##*/}
for i in src/sys/*.nim src/sys/ioqueue/*.nim; do
nimble doc --project --outdir:htmldocs \
'--git.url:https://github.com/${{ github.repository }}' \
'--git.commit:${{ github.sha }}' \
"--git.devel:$branch" \
"$i"
done
# Ignore failures for older Nim
cp htmldocs/{the,}index.html || true
- name: Publish docs
if: >
matrix.pushdocs && github.event_name == 'push' &&
github.ref == 'refs/heads/master'
uses: crazy-max/ghaction-github-pages@v3.0.0
with:
build_dir: nim-sys/htmldocs
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}