Skip to content

exercises(perfect-numbers, queen-attack): sync docs #417

exercises(perfect-numbers, queen-attack): sync docs

exercises(perfect-numbers, queen-attack): sync docs #417

Workflow file for this run

name: uuids
on: [push, pull_request]
jobs:
check_uuids:
runs-on: ubuntu-22.04
env:
NIM_VERSION: '2.0.0'
steps:
- uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11
- name: Get the versions of the installed GCC and OpenSSL
run: |
echo "GCC_VERSION=$(gcc --version | head -n1 | cut -d' ' -f3)" >> "${GITHUB_ENV}"
echo "OPENSSL_VERSION=$(openssl version | cut -d' ' -f2 )" >> "${GITHUB_ENV}"
- name: Cache binary
id: cache-uuids
uses: actions/cache@704facf57e6136b1bc63b828d79edcd491f0ee84
with:
path: _test/check_uuids
key: check_uuids-${{ hashFiles('_test/check_uuids.nim') }}-${{ runner.os }}-nim${{ env.NIM_VERSION }}-gcc${{ env.GCC_VERSION }}-openssl${{ env.OPENSSL_VERSION }}
- name: Install Nim
if: steps.cache-uuids.outputs.cache-hit != 'true'
uses: iffy/install-nim@dcaa84c8d3feb17cd7cc10bd124d1658888d9c0e
with:
version: "binary:${{ env.NIM_VERSION }}"
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Run tests for `check_uuids.nim`
if: steps.cache-uuids.outputs.cache-hit != 'true'
run: nim c --styleCheck:error -d:test -r ./_test/check_uuids.nim
- name: Compile `check_uuids.nim`
if: steps.cache-uuids.outputs.cache-hit != 'true'
run: nim c --styleCheck:error -d:ssl -d:release --passC:-flto --passL:-s ./_test/check_uuids.nim
- name: Run `check_uuids`
run: ./_test/check_uuids