Refactor actions ci. (#58)

* Initial commit.

* Fix nim_branch.

* Fix bootstrap scripts.

* Fix git checkout.

* Add compiler's version dump.

* Add schedule job every day at 22:25 UTC.

* Change schedule to 23:00 UTC.

* Fix issue.

* Attempt to fix cron issue.

* Fix pull_request.

* Recover.

* Revert to previous version.
This commit is contained in:
Eugene Kabanov 2022-07-06 02:24:18 +03:00 committed by GitHub
parent b41129f955
commit 24e006df85
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 12 additions and 43 deletions

View File

@ -11,49 +11,15 @@ jobs:
target:
- os: linux
cpu: amd64
nim_branch: devel
- os: linux
cpu: amd64
nim_branch: v1.2.12
- os: linux
cpu: amd64
nim_branch: v1.0.10
- os: linux
cpu: i386
nim_branch: devel
- os: linux
cpu: i386
nim_branch: v1.2.12
- os: linux
cpu: i386
nim_branch: v1.0.10
- os: macos
cpu: amd64
nim_branch: devel
- os: macos
cpu: amd64
nim_branch: v1.2.12
- os: macos
cpu: amd64
nim_branch: v1.0.10
- os: windows
cpu: amd64
nim_branch: devel
- os: windows
cpu: amd64
nim_branch: v1.2.12
- os: windows
cpu: amd64
nim_branch: v1.0.10
- os: windows
cpu: i386
nim_branch: devel
- os: windows
cpu: i386
nim_branch: v1.2.12
- os: windows
cpu: i386
nim_branch: v1.0.10
nim_branch: [version-1-0, version-1-2, version-1-4, version-1-6, devel]
include:
- target:
os: linux
@ -65,11 +31,11 @@ jobs:
os: windows
builder: windows-2019
name: '${{ matrix.target.os }}-${{ matrix.target.cpu }}-nim-${{ matrix.target.nim_branch }} (${{ matrix.branch }})'
name: '${{ matrix.target.os }}-${{ matrix.target.cpu }}-nim-${{ matrix.nim_branch }} (${{ matrix.branch }})'
runs-on: ${{ matrix.builder }}
env:
NIM_DIR: nim-${{ matrix.target.nim_branch }}-${{ matrix.target.cpu }}
NIM_BRANCH: ${{ matrix.target.nim_branch }}
NIM_DIR: nim-${{ matrix.nim_branch }}-${{ matrix.target.cpu }}
NIM_BRANCH: ${{ matrix.nim_branch }}
NIM_ARCH: ${{ matrix.target.cpu }}
steps:
- name: Checkout nimcrypto
@ -133,12 +99,12 @@ jobs:
- name: Restore Nim from cache
if: >
steps.nim-compiler-cache.outputs.cache-hit != 'true' &&
matrix.target.nim_branch != 'devel'
matrix.nim_branch != 'devel'
id: nim-compiler-cache
uses: actions/cache@v2
with:
path: '${{ github.workspace }}/nim-${{ matrix.target.nim_branch }}-${{ matrix.target.cpu }}'
key: 'nim-${{ matrix.target.cpu }}-${{ matrix.target.nim_branch }}'
path: '${{ github.workspace }}/nim-${{ matrix.nim_branch }}-${{ matrix.target.cpu }}'
key: 'nim-${{ matrix.target.cpu }}-${{ matrix.nim_branch }}'
- name: Build Nim and associated tools
shell: bash
@ -160,5 +126,8 @@ jobs:
shell: bash
working-directory: nimcrypto
run: |
gcc --version
nim --version
nimble --version
nimble install -y
nimble test

View File

@ -29,7 +29,7 @@ ECHO Building Nim [%NIM_BRANCH%] (%NIM_ARCH%) in %NIM_DIR%
git clone https://github.com/nim-lang/Nim.git "%CD%\%NIM_DIR%"
CD "%CD%\%NIM_DIR%"
IF NOT "%NIM_BRANCH%" == "devel" (
git checkout "tags/%NIM_BRANCH%" -b "%NIM_BRANCH%"
git checkout "%NIM_BRANCH%"
) ELSE (
git checkout devel
)

View File

@ -17,7 +17,7 @@ function build_nim {
if [ "${NIM_BRANCH}" = "devel" ]; then
git checkout devel
else
git checkout "tags/${NIM_BRANCH}" -b "${NIM_BRANCH}"
git checkout "${NIM_BRANCH}"
fi
git clone --depth 1 https://github.com/nim-lang/csources_v1
cd csources_v1 && sh build.sh