Skip to content

Commit

Permalink
ci: add tests workflow (#120)
Browse files Browse the repository at this point in the history
For now, the tests fail. At least the `nimble build` step of the new
workflow succeeds in CI - it didn't on Linux until the previous
commit [1].

Add only Linux x86_64 for now. On macOS x86_64, the workflow would
error with:

    clang: error: no such file or directory: '/Users/runner/.local/c0/libs/libffi.a'

and on macOS arm64 it would error with:

    ERROR: unable to find archive matching pattern macosx_arm64.tar.xz

because the Nim nightlies repo doesn't have a binary build for that
platform yet.

[1] 2024-04-08, 5e7a21c, "fix: make nimble build succeed on Linux"
  • Loading branch information
ee7 authored May 10, 2024
1 parent 5e7a21c commit 6d1f3bd
Showing 1 changed file with 46 additions and 0 deletions.
46 changes: 46 additions & 0 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
name: tests

on:
push:
branches:
- dev
- jtv/v2
- main
pull_request:
workflow_dispatch:

permissions:
contents: read

jobs:
tests:
strategy:
fail-fast: false
matrix:
include:
- os: linux
runs-on: ubuntu-22.04
arch: x86_64

name: "${{ matrix.os }}-${{ matrix.arch }}"
runs-on: ${{ matrix.runs-on }}

steps:
- name: Checkout
uses: actions/checkout@0ad4b8fadaa221de15dcec353f45205ec38ea70b # 4.1.4

- name: Install Nim
uses: iffy/install-nim@c76b9157e544576bf61c932ee66ff3c7d194deb9 # 5.0.4
with:
version: "binary:2.0.0"
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} # Avoid rate limiting.

- name: Install Nimble dependencies
run: nimble --accept install --depsOnly

- name: Build
run: nimble build

- name: Run tests
run: ./test

0 comments on commit 6d1f3bd

Please sign in to comment.