update #393
Workflow file for this run
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: test | |
| on: | |
| push: | |
| paths-ignore: | |
| - LICENSE | |
| - README.* | |
| - examples | |
| - editors | |
| - package.json | |
| pull_request: | |
| paths-ignore: | |
| - LICENSE | |
| - README.* | |
| - examples | |
| - editors | |
| - package.json | |
| jobs: | |
| test: | |
| runs-on: ${{ matrix.os }} | |
| strategy: | |
| matrix: | |
| nim-version: | |
| - '2.0.0' | |
| os: | |
| - ubuntu-latest | |
| # - windows-latest | |
| # - macOS-latest | |
| # - macos-13 # building on arm64 fails | |
| steps: | |
| - uses: actions/checkout@v2 | |
| - uses: jiro4989/setup-nim-action@v1 | |
| with: | |
| nim-version: ${{ matrix.nim-version }} | |
| repo-token: ${{ secrets.GITHUB_TOKEN }} | |
| - run: 'sudo apt-get install -y libpcre3-dev' | |
| - run: "npm install cmake-js -g" | |
| - run: "choosenim show path -y" | |
| - run: nimble install -Y | |
| - run: nimble test | |
| - run: denim build src/${{ github.event.repository.name }}.nim -r -y --cmake | |
| - name: "update tim.node" | |
| run: | | |
| git config --local user.name "github-actions[bot]" | |
| git config --local user.email "41898282+github-actions[bot]@users.noreply.github.com" | |
| git config --local pull.ff only | |
| timNodeName="tim-$(echo "${{ runner.os }}" | tr '[:upper:]' '[:lower:]').node" | |
| git pull --ff-only origin "${{ github.ref_name }}" | |
| git checkout . | |
| if test -f ./bindings/node/tim/src/bin/$timNodeName; then | |
| rm -f ./bindings/node/tim/src/bin/$timNodeName | |
| git add ./bindings/node/tim/src/bin/$timNodeName | |
| git diff --cached --quiet || git commit -m "cleanup previous tim.node" | |
| fi | |
| cp ./bin/tim.node ./bindings/node/tim/src/bin/$timNodeName | |
| git add ./bindings/node/tim/src/bin/$timNodeName | |
| git diff --cached --quiet || git commit -m "update tim for node on ${{ runner.os }}" | |
| - name: Push changes | |
| uses: ad-m/github-push-action@master | |
| with: | |
| github_token: ${{ secrets.GITHUB_TOKEN }} | |
| branch: ${{ github.ref_name }} |