From 5c6700effbb11642b5246e4938deb549663d9d8b Mon Sep 17 00:00:00 2001 From: Asherah Connor Date: Sun, 16 Jun 2024 17:23:34 +0300 Subject: [PATCH] template: add workflows. --- template/.github/workflows/cxxrtl-build.yml | 25 ++++++++++++++ template/.github/workflows/synthesis.yml | 36 +++++++++++++++++++++ template/.github/workflows/unit-tests.yml | 25 ++++++++++++++ 3 files changed, 86 insertions(+) create mode 100644 template/.github/workflows/cxxrtl-build.yml create mode 100644 template/.github/workflows/synthesis.yml create mode 100644 template/.github/workflows/unit-tests.yml diff --git a/template/.github/workflows/cxxrtl-build.yml b/template/.github/workflows/cxxrtl-build.yml new file mode 100644 index 0000000..210ab18 --- /dev/null +++ b/template/.github/workflows/cxxrtl-build.yml @@ -0,0 +1,25 @@ +name: CXXRTL build + +on: + push: + branches: [ "main" ] + pull_request: + branches: [ "main" ] + +permissions: + contents: read + +jobs: + cxxrtl-build: + runs-on: ubuntu-latest + steps: + - name: Checkout repo + uses: actions/checkout@v4 + + - name: Install pip dependencies + run: pip install --editable . + + - uses: kivikakk/niar/setup-action@main + + - name: Elaborate, compile and run cxxrtl + run: python -m ili9341spi cxxrtl diff --git a/template/.github/workflows/synthesis.yml b/template/.github/workflows/synthesis.yml new file mode 100644 index 0000000..bcb62aa --- /dev/null +++ b/template/.github/workflows/synthesis.yml @@ -0,0 +1,36 @@ +name: Synthesis + +on: + push: + branches: [ "main" ] + pull_request: + branches: [ "main" ] + +permissions: + contents: read + +jobs: + synthesis: + runs-on: ubuntu-latest + + strategy: + fail-fast: false + matrix: + board: + - icebreaker + - ulx3s + + steps: + - name: Checkout repo + uses: actions/checkout@v4 + + - name: Install pip dependencies + run: pip install --editable . + + - uses: kivikakk/niar/setup-action@main + with: + install-oss-cad-suite: true + github-token: ${{ secrets.GITHUB_TOKEN }} + + - name: Elaborate and synthesise + run: python -m ili9341spi build -b ${{ matrix.board }} diff --git a/template/.github/workflows/unit-tests.yml b/template/.github/workflows/unit-tests.yml new file mode 100644 index 0000000..31c7215 --- /dev/null +++ b/template/.github/workflows/unit-tests.yml @@ -0,0 +1,25 @@ +name: Unit tests + +on: + push: + branches: [ "main" ] + pull_request: + branches: [ "main" ] + +permissions: + contents: read + +jobs: + unit-tests: + runs-on: ubuntu-latest + steps: + - name: Checkout repo + uses: actions/checkout@v4 + + - name: Install pip dependencies + run: pip install --editable . + + - uses: kivikakk/niar/setup-action@main + + - name: Run tests + run: pytest tests