bring feat/chronos-v4 up-to-date with feat/build-improvements

This commit is contained in:
gmega 2024-01-19 19:34:40 -03:00
parent 7540cf3b18
commit e8ad522799
No known key found for this signature in database
GPG Key ID: FFD8DAF00660270F
2 changed files with 17 additions and 7 deletions

View File

@ -150,14 +150,13 @@ runs:
uses: actions/cache@v3
with:
path: NimBinaries
key: ${{ inputs.os }}-${{ inputs.cpu }}-nim-cache-${{ env.cache_nonce }}-${{ github.run_id }}
restore-keys: ${{ inputs.os }}-${{ inputs.cpu }}-nim-cache-${{ env.cache_nonce }}
key: ${{ inputs.os }}-${{ inputs.cpu }}-cache-${{ env.cache_nonce }}-${{ github.run_id }}
restore-keys: ${{ inputs.os }}-${{ inputs.cpu }}-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
./env.sh make -j${ncpu} CI_CACHE=NimBinaries ARCH_OVERRIDE=${PLATFORM} QUICK_AND_DIRTY_COMPILER=1 update
echo
nim --version
./env.sh nim --version

15
env.sh
View File

@ -1,5 +1,6 @@
#!/usr/bin/env bash
# This is the compiler version that will get used everywher.
NIM_VERSION="f45bdea94ac4ed9a9bae03426275456aeb0cab2a"
NIM_REPO_URL="https://github.com/gmega/Nim"
@ -8,6 +9,16 @@ NIM_REPO_URL="https://github.com/gmega/Nim"
REL_PATH="$(dirname ${BASH_SOURCE[0]:-${(%):-%x}})"
ABS_PATH="$(cd ${REL_PATH}; pwd)"
ENV_FILE="${ABS_PATH}/vendor/nimbus-build-system/scripts/env.sh"
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
if ! [ -f "$ENV_FILE" ]; then
# Before the first "make update", the env file doesn't exist, so just run
# the command that comes after (without a child shell), if any. Running
# ./env.sh make update will cause the right compiler to be built right from
# the start.
echo "Nimbus env file not found"
"$@"
else
source "${ENV_FILE}"
fi