chore: Cleanup CI #8
Workflow file for this run
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: Base Tests | |
on: | |
push: | |
branches: | |
- master | |
pull_request: | |
workflow_call: | |
inputs: | |
include: | |
description: 'Include matrix configurations' | |
required: false | |
type: string | |
default: "[]" | |
exclude: | |
description: 'Exclude matrix configurations' | |
required: false | |
type: string | |
default: "[]" | |
concurrency: | |
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }} | |
cancel-in-progress: true | |
jobs: | |
delete_cache: | |
name: Delete github action's branch cache | |
runs-on: ubuntu-latest | |
steps: | |
- uses: snnaplab/delete-branch-cache-action@v1 | |
test: | |
needs: delete_cache | |
timeout-minutes: 90 | |
strategy: | |
fail-fast: false | |
matrix: | |
platform: | |
- os: linux | |
builder: ubuntu-20.04 | |
cpu: amd64 | |
shell: bash | |
- os: linux | |
builder: ubuntu-20.04 | |
cpu: i386 | |
shell: bash | |
- os: macos | |
builder: macos-12 | |
cpu: amd64 | |
shell: bash | |
- os: windows | |
builder: windows-2019 | |
cpu: amd64 | |
shell: msys2 {0} | |
nim-branch: | |
- version-1-6 | |
# If exclude or include are defined use their value, otherwise default to empty list (as declared on workflow_call.inputs). | |
# Reason for above is when workflow is not initiated by workflow_call, the parameters are not defined. Their value is 0 or '' (empty string). | |
# This relies on the value 0 meaning the parameter was not filled in. | |
include: ${{ inputs.include != 0 && fromJSON(inputs.include) || fromJSON('[]') }} | |
exclude: ${{ inputs.exclude != 0 && fromJSON(inputs.exclude) || fromJSON('[]') }} | |
defaults: | |
run: | |
shell: ${{ matrix.platform.shell }} | |
name: '${{ matrix.platform.os }}-${{ matrix.platform.cpu }} (Nim ${{ matrix.nim-branch }})' | |
runs-on: ${{ matrix.platform.builder }} | |
continue-on-error: ${{ matrix.nim-branch == 'version-2-0' || matrix.nim-branch == 'devel' }} | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
with: | |
submodules: true | |
- name: Setup Nim | |
uses: "./.github/actions/install_nim" | |
with: | |
os: ${{ matrix.platform.os }} | |
shell: ${{ matrix.platform.shell }} | |
nim_branch: ${{ matrix.nim-branch }} | |
cpu: ${{ matrix.platform.cpu }} | |
- name: Setup Go | |
uses: actions/setup-go@v4 | |
with: | |
go-version: '~1.15.5' | |
cache: false | |
- name: Install p2pd | |
run: | | |
V=1 bash scripts/build_p2pd.sh p2pdCache 124530a3 | |
- name: Install deps | |
run: | | |
nimble install -y --depsOnly | |
- name: Run tests | |
run: | | |
nim --version | |
nimble --version | |
# --mm:orc | Should we run tests with ORC instead? | |
NIMFLAGS="${NIMFLAGS} --mm:refc" | |
nimble test |