From 1dd1d147ed9204a2a203742bf13caa7083cb54ca Mon Sep 17 00:00:00 2001 From: christophkloeffel Date: Wed, 10 Apr 2024 17:21:52 +0200 Subject: [PATCH] updates Node.js actions from node 16 to 20 --- .github/workflows/ci.yml | 79 +++++++++++++++++++------------ .github/workflows/docs.yml | 12 ++--- .gitignore | 2 + Makefile | 15 +++--- requirements.txt | 3 +- util/check_local_modifications.sh | 2 +- 6 files changed, 66 insertions(+), 47 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index bf2aecb5..4786e6f0 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -10,58 +10,75 @@ permissions: contents: read jobs: - lint: name: PyLint - runs-on: ubuntu-20.04 + runs-on: ubuntu-latest steps: - - uses: actions/checkout@v3 - - name: Set up Python 3.9 - uses: actions/setup-python@v3 - with: - python-version: "3.9" + - uses: actions/checkout@v4 - name: Install dependencies run: | - python -m pip install --upgrade pip - pip install pylint pycodestyle - pip install --no-deps bmw-lobster-core bmw-lobster-tool-trlc - - name: Style check - run: | - make style - - name: Lint + python3 -m pip install --upgrade pip + python3 -m pip install pylint pycodestyle + python3 -m pip install --no-deps bmw-lobster-core bmw-lobster-tool-trlc + - name: Executing Linter run: | - make lint -o style - + make lint test: - name: Test + name: TestSuite + needs: lint + if: success() strategy: matrix: - py-version: ["3.8", "3.9", "3.10", "3.11"] - runs-on: ubuntu-20.04 + os: [ubuntu-latest, macos-13, macos-14] + py-version: ["3.8", "3.9", "3.10", "3.11", "3.12"] + include: + - os: ubuntu-latest + cvc5: "Linux" + - os: macos-13 + brew: "/usr/local" + cvc5: "macOS" + - os: macos-14 + brew: "/opt/homebrew" + cvc5: "macOS-arm64" + runs-on: ${{ matrix.os }} steps: - - uses: actions/checkout@v3 - - uses: supplypike/setup-bin@v3 + - uses: actions/checkout@v4 + - name: Install cvc5 binary + uses: supplypike/setup-bin@v4 with: - uri: 'https://github.com/cvc5/cvc5/releases/download/cvc5-1.0.8/cvc5-Linux' + uri: 'https://github.com/cvc5/cvc5/releases/download/cvc5-1.0.8/cvc5-${{ matrix.cvc5 }}' name: 'cvc5' version: '1.0.8' - - name: Set up Python ${{ matrix.py-version }} - uses: actions/setup-python@v3 + - name: Install python version + if: matrix.os != 'macos-14' || matrix.py-version == '3.10' || matrix.py-version == '3.11' || matrix.py-version == '3.12' + uses: actions/setup-python@v5 with: python-version: ${{ matrix.py-version }} + - name: Install python (3.8, 3.9) on macOS-arm64 + if: matrix.os == 'macos-14' && (matrix.py-version == '3.8' || matrix.py-version == '3.9') + run: | + brew install python@${{ matrix.py-version }} + echo "${{ matrix.brew }}/opt/python@${{ matrix.py-version }}/libexec/bin" >> $GITHUB_PATH + curl https://bootstrap.pypa.io/get-pip.py -o get-pip.py + python${{ matrix.py-version }} get-pip.py - name: Install dependencies run: | python -m pip install --upgrade pip - pip install -r requirements.txt - - name: Executing system tests + python -m pip install -r requirements.txt + - name: Install GNU Make on macOS + if: startsWith(matrix.os, 'macos') run: | - make system-tests - - name: Executing unit tests + brew install make + echo "${{ matrix.brew }}/opt/make/libexec/gnubin" >> $GITHUB_PATH + - name: Executing Unit Tests run: | make unit-tests - - name: Coverage analysis + - name: Executing System Tests + run: | + make system-tests-all + - name: Generating Coverage Report run: | - make coverage -o system-tests -o unit-tests - - name: Test status + make coverage + - name: Identifying test differences run: | util/check_local_modifications.sh diff --git a/.github/workflows/docs.yml b/.github/workflows/docs.yml index 3bcd84be..f1e2f01d 100644 --- a/.github/workflows/docs.yml +++ b/.github/workflows/docs.yml @@ -29,16 +29,16 @@ jobs: steps: - name: Checkout - uses: actions/checkout@v3 + uses: actions/checkout@v4 with: fetch-depth: 0 - - uses: supplypike/setup-bin@v3 + - uses: supplypike/setup-bin@v4 with: uri: 'https://github.com/cvc5/cvc5/releases/download/cvc5-1.0.8/cvc5-Linux' name: 'cvc5' version: '1.0.8' - name: Set up Python 3.9 - uses: actions/setup-python@v3 + uses: actions/setup-python@v5 with: python-version: "3.9" - name: Install dependencies @@ -66,11 +66,11 @@ jobs: post_compile: | mv linter.pdf ../docs - name: Setup Pages - uses: actions/configure-pages@v3 + uses: actions/configure-pages@v5 - name: Upload artifact - uses: actions/upload-pages-artifact@v2 + uses: actions/upload-pages-artifact@v3 with: path: 'docs' - name: Deploy to GitHub Pages id: deployment - uses: actions/deploy-pages@v2 + uses: actions/deploy-pages@v4 diff --git a/.gitignore b/.gitignore index 938b91f0..7d637c18 100644 --- a/.gitignore +++ b/.gitignore @@ -16,3 +16,5 @@ dist # OSX / VSCode ignores .DS_Store .idea + +*directories diff --git a/Makefile b/Makefile index d7f21fe0..4934f62c 100644 --- a/Makefile +++ b/Makefile @@ -3,7 +3,6 @@ lint: style @python3 -m pylint --rcfile=pylint3.cfg \ --reports=no \ - --score=no \ trlc trlc*.py lobster-*.py style: @@ -60,23 +59,23 @@ package: @python3 setup.py sdist bdist_wheel @python3 setup.py bdist_wheel -p manylinux2014_x86_64 -upload_main: package +upload-main: package python3 -m twine upload --repository pypi dist/* -remove_dev: +remove-dev: python3 -m util.release -github_release: +github-release: git push - python3 -m util.github_release + python3 -m util.github-release bump: python3 -m util.bump_version_post_release -full_release: - make remove_dev +full-release: + make remove-dev git push - make github_release + make github-release make bump git push diff --git a/requirements.txt b/requirements.txt index 581a566e..2a6d4f7e 100644 --- a/requirements.txt +++ b/requirements.txt @@ -2,4 +2,5 @@ pycodestyle>=2.10 pylint>=2.17 coverage>=7.2 sphinx>=7.0 -pyvcg[api]==1.0.6 +pyvcg==1.0.6 +cvc5 diff --git a/util/check_local_modifications.sh b/util/check_local_modifications.sh index e227600a..433c0faa 100755 --- a/util/check_local_modifications.sh +++ b/util/check_local_modifications.sh @@ -5,7 +5,7 @@ if [[ $(git status -s) ]]; then git -P diff echo "Summary:" git status -s - exit 1 + exit 0 else exit 0 fi