Skip to content

Commit

Permalink
Transfer to GitHub Actions
Browse files Browse the repository at this point in the history
Squashed commit of the following:

commit e87d835eb107a2dc82e6589304c04f6a005723de
Author: Niels Mündler <[email protected]>
Date:   Wed Jul 24 17:01:55 2024 +0200

    Add CI status to README

commit 7f1990e
Author: Niels Mündler <[email protected]>
Date:   Wed Jul 24 16:51:43 2024 +0200

    Verify installation of secp256k1

commit 51cc8c2
Author: Niels Mündler <[email protected]>
Date:   Wed Jul 24 16:36:44 2024 +0200

    Run using poetry

commit bdc8bbf
Author: Niels Mündler <[email protected]>
Date:   Wed Jul 24 16:34:02 2024 +0200

    Run black explicity

commit 722a0b9
Author: Niels Mündler <[email protected]>
Date:   Wed Jul 24 16:32:05 2024 +0200

    Install latest poetry and dev requirements

commit 9b8d219
Author: Niels Mündler <[email protected]>
Date:   Wed Jul 24 16:29:14 2024 +0200

    Install black

commit 5db907d
Author: Niels Mündler <[email protected]>
Date:   Wed Jul 24 16:24:47 2024 +0200

    Fix

commit 5a13623
Author: Niels Mündler <[email protected]>
Date:   Wed Jul 24 16:21:03 2024 +0200

    Transfer to github actions

commit b4418bf
Merge: 5680328 20dff6b
Author: Niels Mündler <[email protected]>
Date:   Wed Jul 24 00:06:48 2024 +0200

    Merge branch 'dev'

commit 5680328
Author: Niels Mündler <[email protected]>
Date:   Wed Jul 24 00:03:11 2024 +0200

    Fix typecheck for mkconstr
  • Loading branch information
nielstron committed Jul 24, 2024
1 parent 20dff6b commit f976225
Show file tree
Hide file tree
Showing 3 changed files with 74 additions and 46 deletions.
73 changes: 73 additions & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,73 @@
name: CI/CD

on:
push:
pull_request:
release:
types: [created]

jobs:

build:
runs-on: ubuntu-latest
strategy:
matrix:
python-version: ['3.8', '3.9', '3.10', '3.11']
fail-fast: true

steps:
- uses: actions/checkout@v3

- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}

- name: Install secp256k1
run: |
bash install_secp256k1.sh
echo "/usr/local/lib" >> $GITHUB_PATH
echo "LD_LIBRARY_PATH=/usr/local/lib:$LD_LIBRARY_PATH" >> $GITHUB_ENV
- name: Install secp256k1-py
run: pip install python-secp256k1-cardano

- name: Verify secp256k1 installation
run: |
python -c "import pysecp256k1; print('secp256k1 installed successfully')"
- name: Install dependencies
run: |
pip install -U poetry
poetry install --with dev
- name: Run tests and coverage
run: |
poetry run black --check .
poetry run coverage run --source=uplc -m pytest uplc/tests
poetry run coverage run -a --source=uplc -m uplc parse examples/fibonacci.uplc
poetry run coverage run -a --source=uplc -m uplc dump examples/fibonacci.uplc --dialect legacy-aiken
poetry run coverage run -a --source=uplc -m uplc dump examples/fibonacci.uplc --dialect plutus --unique-varnames
poetry run coverage run -a --source=uplc -m uplc eval examples/fibonacci.uplc "(con integer 5)"
poetry run coverage run -a --source=uplc -m uplc build examples/fibonacci.uplc
poetry run coverage run -a --source=uplc -m uplc build examples/fibonacci.uplc -fremove-traces
poetry run coverage run -a --source=uplc -m uplc build examples/fibonacci.uplc -fconstant-folding
poetry run coverage run -a --source=uplc -m uplc build examples/fibonacci.uplc -fremove-force-delay
poetry run coverage run -a --source=uplc -m uplc build examples/fibonacci.uplc -O0
poetry run coverage run -a --source=uplc -m uplc build examples/fibonacci.uplc -O1
poetry run coverage run -a --source=uplc -m uplc build examples/fibonacci.uplc -O2
poetry run coverage run -a --source=uplc -m uplc build examples/fibonacci.uplc -O3
poetry run coverage run -a --source=uplc -m uplc dump build/fibonacci/script.cbor --from-cbor
- name: Upload coverage reports to Codecov
uses: codecov/codecov-action@v3

- name: Publish to PyPI
if: github.event_name == 'release' && matrix.python-version == '3.10'
env:
PYPI_USERNAME: __token__
PYPI_PASSWORD: ${{ secrets.PYPI_PASSWORD }}
run: |
poetry config pypi-token.pypi $PYPI_PASSWORD
poetry build
poetry publish
45 changes: 0 additions & 45 deletions .travis.yml

This file was deleted.

2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
Untyped Plutus Language Core
==================================================
[![Build Status](https://app.travis-ci.com/OpShin/uplc.svg?branch=master)](https://app.travis-ci.com/OpShin/uplc)
[![CI/CD](https://github.com/OpShin/uplc/actions/workflows/build.yml/badge.svg)](https://github.com/OpShin/uplc/actions/workflows/build.yml)
[![PyPI version](https://badge.fury.io/py/uplc.svg)](https://pypi.org/project/uplc/)
![PyPI - Python Version](https://img.shields.io/pypi/pyversions/uplc.svg)
[![PyPI - Status](https://img.shields.io/pypi/status/uplc.svg)](https://pypi.org/project/uplc/)
Expand Down

0 comments on commit f976225

Please sign in to comment.