mirror of
https://github.com/logos-storage/nim-bearssl.git
synced 2026-01-04 06:23:08 +00:00
CI: simplify Nim compiler caching (#19)
This commit is contained in:
parent
0a7401ad46
commit
ba68572fde
47
.github/workflows/ci.yml
vendored
47
.github/workflows/ci.yml
vendored
@ -1,4 +1,4 @@
|
||||
name: nim-bearssl CI
|
||||
name: CI
|
||||
on: [push, pull_request]
|
||||
|
||||
jobs:
|
||||
@ -7,38 +7,18 @@ jobs:
|
||||
fail-fast: false
|
||||
max-parallel: 20
|
||||
matrix:
|
||||
branch: [master]
|
||||
test_lang: [c, cpp]
|
||||
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 +30,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 }}-${{ matrix.test_lang }}'
|
||||
runs-on: ${{ matrix.builder }}
|
||||
steps:
|
||||
- name: Checkout nim-bearssl
|
||||
@ -145,11 +125,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
|
||||
@ -164,19 +143,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-bearssl tests
|
||||
shell: bash
|
||||
@ -184,4 +151,4 @@ jobs:
|
||||
run: |
|
||||
git submodule update --init --recursive
|
||||
nimble install -y --depsOnly
|
||||
env TEST_LANG="${{ matrix.target.TEST_LANG }}" nimble test
|
||||
env TEST_LANG="${{ matrix.test_lang }}" nimble test
|
||||
|
||||
@ -5,7 +5,7 @@
|
||||

|
||||
[](https://opensource.org/licenses/MIT)
|
||||
[](https://opensource.org/licenses/Apache-2.0)
|
||||

|
||||

|
||||
|
||||
[BearSSL](https://bearssl.org/) wrapper.
|
||||
|
||||
|
||||
@ -3,6 +3,7 @@ version = "0.1.5"
|
||||
author = "Status Research & Development GmbH"
|
||||
description = "BearSSL wrapper"
|
||||
license = "MIT or Apache License 2.0"
|
||||
mode = ScriptMode.Verbose
|
||||
|
||||
# Dependencies
|
||||
requires "nim >= 1.2.0"
|
||||
@ -15,7 +16,7 @@ proc test(env, path: string) =
|
||||
lang = getEnv"TEST_LANG"
|
||||
|
||||
exec "nim " & lang & " " & env &
|
||||
" -r --hints:off --warnings:off " & path
|
||||
" -r --hints:off --skipParentCfg " & path
|
||||
|
||||
task test, "Run tests":
|
||||
exec "nim -v"
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user