mirror of
https://github.com/status-im/nim-eth.git
synced 2025-02-25 20:25:25 +00:00
CI: refactor Nim compiler caching (#358)
This commit is contained in:
parent
41aba1b6a0
commit
0ad571ab27
49
.github/workflows/ci.yml
vendored
49
.github/workflows/ci.yml
vendored
@ -1,4 +1,4 @@
|
||||
name: nim-eth CI
|
||||
name: CI
|
||||
on: [push, pull_request]
|
||||
|
||||
jobs:
|
||||
@ -7,38 +7,17 @@ jobs:
|
||||
fail-fast: false
|
||||
max-parallel: 20
|
||||
matrix:
|
||||
branch: [master]
|
||||
target:
|
||||
- os: linux
|
||||
cpu: amd64
|
||||
TEST_LANG: c
|
||||
- os: linux
|
||||
cpu: amd64
|
||||
TEST_LANG: cpp
|
||||
- os: linux
|
||||
cpu: i386
|
||||
TEST_LANG: c
|
||||
- os: linux
|
||||
cpu: i386
|
||||
TEST_LANG: cpp
|
||||
- os: macos
|
||||
cpu: amd64
|
||||
TEST_LANG: c
|
||||
- os: macos
|
||||
cpu: amd64
|
||||
TEST_LANG: cpp
|
||||
- os: windows
|
||||
cpu: amd64
|
||||
TEST_LANG: c
|
||||
- os: windows
|
||||
cpu: amd64
|
||||
TEST_LANG: cpp
|
||||
- os: windows
|
||||
cpu: i386
|
||||
TEST_LANG: c
|
||||
- os: windows
|
||||
cpu: i386
|
||||
TEST_LANG: cpp
|
||||
include:
|
||||
- target:
|
||||
os: linux
|
||||
@ -50,7 +29,7 @@ jobs:
|
||||
os: windows
|
||||
builder: windows-2019
|
||||
|
||||
name: '${{ matrix.target.os }}-${{ matrix.target.cpu }}-${{ matrix.target.TEST_LANG }} (${{ matrix.branch }})'
|
||||
name: '${{ matrix.target.os }}-${{ matrix.target.cpu }}'
|
||||
runs-on: ${{ matrix.builder }}
|
||||
timeout-minutes: 60
|
||||
steps:
|
||||
@ -229,11 +208,10 @@ jobs:
|
||||
id: nim-cache
|
||||
uses: actions/cache@v2
|
||||
with:
|
||||
path: nim
|
||||
key: 'nim-${{ matrix.target.os }}-${{ matrix.target.cpu }}-${{ steps.versions.outputs.nimbus_build_system }}'
|
||||
path: NimBinaries
|
||||
key: 'NimBinaries-${{ matrix.target.os }}-${{ matrix.target.cpu }}-${{ steps.versions.outputs.nimbus_build_system }}'
|
||||
|
||||
- name: Build Nim and associated tools
|
||||
if: steps.nim-cache.outputs.cache-hit != 'true'
|
||||
shell: bash
|
||||
run: |
|
||||
curl -O -L -s -S https://raw.githubusercontent.com/status-im/nimbus-build-system/master/scripts/build_nim.sh
|
||||
@ -248,19 +226,7 @@ jobs:
|
||||
MAKE_CMD="make"
|
||||
fi
|
||||
env MAKE="$MAKE_CMD -j2" ARCH_OVERRIDE=$PLATFORM CC=gcc bash build_nim.sh nim csources dist/nimble NimBinaries
|
||||
|
||||
# clean up to save cache space
|
||||
cd nim
|
||||
rm koch
|
||||
rm -rf nimcache
|
||||
rm -rf csources
|
||||
rm -rf tests
|
||||
rm -rf dist
|
||||
rm -rf .git
|
||||
|
||||
- name: Setup environment
|
||||
shell: bash
|
||||
run: echo '${{ github.workspace }}/nim/bin' >> $GITHUB_PATH
|
||||
echo '${{ github.workspace }}/nim/bin' >> $GITHUB_PATH
|
||||
|
||||
- name: Run nim-eth tests
|
||||
shell: bash
|
||||
@ -269,5 +235,6 @@ jobs:
|
||||
export PLATFORM="${{ matrix.target.os }}-${{ matrix.target.cpu }}"
|
||||
export LD_LIBRARY_PATH="$LD_LIBRARY_PATH:/usr/local/lib"
|
||||
nimble install -y --depsOnly
|
||||
env TEST_LANG="${{ matrix.target.TEST_LANG }}" PLATFORM="$PLATFORM" nimble test
|
||||
env TEST_LANG="${{ matrix.target.TEST_LANG }}" PLATFORM="$PLATFORM" nimble build_dcli
|
||||
nimble test
|
||||
nimble build_dcli
|
||||
|
||||
|
@ -3,7 +3,7 @@
|
||||
[](https://opensource.org/licenses/Apache-2.0)
|
||||
[](https://opensource.org/licenses/MIT)
|
||||

|
||||

|
||||

|
||||
|
||||
## Introduction
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user