backport changes from https://github.com/codex-storage/nim-codex/pull/680 so I can use a custom compiler in dist tests without too much hassle
This commit is contained in:
parent
7aa922b90f
commit
fd78727978
|
@ -9,12 +9,6 @@ inputs:
|
|||
cpu:
|
||||
description: "CPU to build for"
|
||||
default: "amd64"
|
||||
nim_version:
|
||||
description: "Nim version"
|
||||
default: "version-1-6"
|
||||
nim_repo_url:
|
||||
description: "Nim compiler repository"
|
||||
default: "https://github.com/nim-lang/Nim"
|
||||
shell:
|
||||
description: "Shell to run commands in"
|
||||
default: "bash --noprofile --norc -e -o pipefail"
|
||||
|
@ -156,22 +150,14 @@ runs:
|
|||
uses: actions/cache@v3
|
||||
with:
|
||||
path: NimBinaries
|
||||
key: ${{ inputs.os }}-${{ inputs.cpu }}-nim-${{ inputs.nim_version }}-cache-${{ env.cache_nonce }}-${{ github.run_id }}
|
||||
restore-keys: ${{ inputs.os }}-${{ inputs.cpu }}-nim-${{ inputs.nim_version }}-cache-${{ env.cache_nonce }}
|
||||
|
||||
- name: Set NIM_COMMIT
|
||||
shell: ${{ inputs.shell }} {0}
|
||||
run: echo "NIM_COMMIT=${{ inputs.nim_version }}" >> ${GITHUB_ENV}
|
||||
|
||||
# FIXME: drop this once https://github.com/nim-lang/Nim/issues/23214 gets upstreamed/backported
|
||||
- name: Set NIM_REPO
|
||||
shell: ${{ inputs.shell }} {0}
|
||||
run: echo "NIM_REPO=${{ inputs.nim_repo_url }}" >> ${GITHUB_ENV}
|
||||
key: ${{ inputs.os }}-${{ inputs.cpu }}-nim-cache-${{ env.cache_nonce }}-${{ github.run_id }}
|
||||
restore-keys: ${{ inputs.os }}-${{ inputs.cpu }}-nim-cache-${{ env.cache_nonce }}
|
||||
|
||||
- name: Build Nim and Codex dependencies
|
||||
shell: ${{ inputs.shell }} {0}
|
||||
run: |
|
||||
. ./env.sh
|
||||
make -j${ncpu} CI_CACHE=NimBinaries ARCH_OVERRIDE=${PLATFORM} QUICK_AND_DIRTY_COMPILER=1 update
|
||||
echo
|
||||
./env.sh nim --version
|
||||
nim --version
|
||||
|
||||
|
|
|
@ -7,9 +7,6 @@ on:
|
|||
workflow_dispatch:
|
||||
env:
|
||||
cache_nonce: 0 # Allows for easily busting actions/cache caches
|
||||
# FIXME: change this once https://github.com/nim-lang/Nim/issues/23214 gets upstreamed/backported
|
||||
nim_version: f45bdea94ac4ed9a9bae03426275456aeb0cab2a
|
||||
nim_repo_url: https://github.com/gmega/Nim
|
||||
jobs:
|
||||
build:
|
||||
strategy:
|
||||
|
@ -59,8 +56,6 @@ jobs:
|
|||
with:
|
||||
os: ${{ matrix.os }}
|
||||
shell: ${{ matrix.shell }}
|
||||
nim_version: ${{ env.nim_version }}
|
||||
nim_repo_url: ${{ env.nim_repo_url }}
|
||||
|
||||
## Part 1 Tests ##
|
||||
- name: Unit tests
|
||||
|
@ -105,8 +100,6 @@ jobs:
|
|||
uses: ./.github/actions/nimbus-build-system
|
||||
with:
|
||||
os: linux
|
||||
nim_version: ${{ env.nim_version }}
|
||||
nim_repo_url: ${{ env.nim_repo_url }}
|
||||
|
||||
- name: Generate coverage data
|
||||
run: |
|
||||
|
|
6
env.sh
6
env.sh
|
@ -1,7 +1,13 @@
|
|||
#!/usr/bin/env bash
|
||||
|
||||
NIM_VERSION="f45bdea94ac4ed9a9bae03426275456aeb0cab2a"
|
||||
NIM_REPO_URL="https://github.com/gmega/Nim"
|
||||
|
||||
# We use ${BASH_SOURCE[0]} instead of $0 to allow sourcing this file
|
||||
# and we fall back to a Zsh-specific special var to also support Zsh.
|
||||
REL_PATH="$(dirname ${BASH_SOURCE[0]:-${(%):-%x}})"
|
||||
ABS_PATH="$(cd ${REL_PATH}; pwd)"
|
||||
|
||||
export NIM_COMMIT="${NIM_COMMIT:-${NIM_VERSION}}"
|
||||
export NIM_REPO="${NIM_REPO_URL:-${NIM_REPO_URL}}"
|
||||
source ${ABS_PATH}/vendor/nimbus-build-system/scripts/env.sh
|
||||
|
|
Loading…
Reference in New Issue