From 4e7f7d57373606568c3822800ee66429daa382af Mon Sep 17 00:00:00 2001 From: web3-developer <51288821+web3-developer@users.noreply.github.com> Date: Wed, 26 Jun 2024 22:58:27 +0800 Subject: [PATCH] Manually install nph as before. --- .github/workflows/ci.yml | 28 ++++++++++++++++++++-------- 1 file changed, 20 insertions(+), 8 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index cfb78a2..1ada03a 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -7,6 +7,26 @@ on: workflow_dispatch: jobs: + lint: + name: "nph Lint" + runs-on: ubuntu-latest + steps: + - name: Checkout + uses: actions/checkout@v4 + with: + fetch-depth: 2 # In PR, has extra merge commit: ^1 = PR, ^2 = base + + - name: Check nph formatting + # Pin nph to a specific version to avoid sudden style differences. + # Updating nph version should be accompanied with running the new + # version on the project directory. + run: | + VERSION="v0.5.1" + ARCHIVE="nph-linux_x64.tar.gz" + curl -L "https://github.com/arnetheduck/nph/releases/download/${VERSION}/${ARCHIVE}" -o ${ARCHIVE} + tar -xzf ${ARCHIVE} + ./nph . + git diff --exit-code build: strategy: fail-fast: false @@ -166,14 +186,6 @@ jobs: bash build_nim.sh nim csources dist/nimble NimBinaries echo '${{ github.workspace }}/nim/bin' >> $GITHUB_PATH - - name: Check nph formatting - if: runner.os == 'Linux' && matrix.branch == 'version-2-0' - run: | - export LD_LIBRARY_PATH="${LD_LIBRARY_PATH}:/usr/local/lib" - nimble install nph@#head - $HOME/.nimble/bin/nph . - git diff --exit-code - - name: Run tests run: | export LD_LIBRARY_PATH="${LD_LIBRARY_PATH}:/usr/local/lib"