Skip to content

Commit

Permalink
wip
Browse files Browse the repository at this point in the history
  • Loading branch information
AlejandroCabeza committed Jul 19, 2024
1 parent 8cb351b commit 815be21
Show file tree
Hide file tree
Showing 3 changed files with 100 additions and 24 deletions.
85 changes: 85 additions & 0 deletions .github/workflows/base_daily.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,85 @@
# name: daily-common

# on:
# workflow_call:
# inputs:
# nim-branch:
# description: 'Nim branch'
# required: true
# type: string
# cpu:
# description: 'CPU'
# required: true
# type: string
# exclude:
# description: 'Exclude matrix configurations'
# required: false
# type: string
# default: "[]"

# jobs:
# delete_cache:
# name: Delete github action's branch cache
# runs-on: ubuntu-latest
# steps:
# - uses: snnaplab/delete-branch-cache-action@v1

# build:
# needs: delete_cache
# timeout-minutes: 90
# strategy:
# fail-fast: false
# matrix:
# platform:
# - os: linux
# builder: ubuntu-22.04
# shell: bash
# - os: macos
# builder: macos-13
# shell: bash
# - os: windows
# builder: windows-2022
# shell: msys2 {0}
# branch: ${{ fromJSON(inputs.nim-branch) }}
# cpu: ${{ fromJSON(inputs.cpu) }}
# exclude: ${{ fromJSON(inputs.exclude) }}

# defaults:
# run:
# shell: ${{ matrix.platform.shell }}

# name: '${{ matrix.platform.os }}-${{ matrix.cpu }} (Nim ${{ matrix.branch }})'
# runs-on: ${{ matrix.platform.builder }}
# continue-on-error: ${{ matrix.branch == 'devel' || matrix.branch == 'version-2-0' }}
# steps:
# - name: Checkout
# uses: actions/checkout@v4

# - name: Setup Nim
# uses: "./.github/actions/install_nim"
# with:
# os: ${{ matrix.platform.os }}
# shell: ${{ matrix.platform.shell }}
# nim_branch: ${{ matrix.branch }}
# cpu: ${{ matrix.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: Run tests
# run: |
# nim --version
# nimble --version
# nimble install -y --depsOnly
# NIMFLAGS="${NIMFLAGS} --mm:refc" nimble test
# if [[ "${{ matrix.branch }}" == "devel" ]]; then
# echo -e "\nTesting with '--mm:orc':\n"
# NIMFLAGS="${NIMFLAGS} --mm:orc" nimble test
# fi
37 changes: 14 additions & 23 deletions .github/workflows/base_tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -38,35 +38,26 @@ jobs:
platform:
- os: linux
cpu: amd64
builder: ubuntu-22.04
shell: bash
- os: linux
cpu: i386
builder: ubuntu-22.04
shell: bash
- os: macos
cpu: amd64
builder: macos-13
shell: bash
- os: windows
cpu: amd64
nim_branch: ${{ inputs.exclude != 0 && fromJSON(inputs.nim_branch) || fromJSON("[{'version': 'version-1-6'}, {'version': 'version-2-0'}]") }}
include:
- platform:
os: linux
builder: ubuntu-22.04
shell: bash
- platform:
os: macos
builder: macos-13
shell: bash
- platform:
os: windows
builder: windows-2022
shell: msys2 {0}ve
- nim_branch:
version: version-1-6
memory_management: refc
- nim_branch:
version: version-2-0
memory_management: refc
- nim_branch:
version: devel
memory_management: orc
builder: windows-2022
shell: msys2 {0}
nim_branch:
- version: version-1-6
memory_management: refc
- version: version-2-0
memory_management: refc
- ${{ fromJson(inputs.nim_branch) }}

# If exclude is defined then use its 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).
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/daily_devel.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,5 +10,5 @@ jobs:
name: Daily Nim Devel
uses: ./.github/workflows/base_tests.yml
with:
include: "[{'nim_branch': {'version': 'devel', 'memory_management': 'orc'}}]"
nim_branch: "[{'version': 'devel', 'memory_management': 'orc'}]"
exclude: "[{'platform': {'os': 'windows'}}, {'platform': {'os': 'macos'}}, {'platform': {'cpu': 'i386'}}]"

0 comments on commit 815be21

Please sign in to comment.