This repository has been archived by the owner on Apr 25, 2024. It is now read-only.
BugReport reporter #4279
This file contains 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: 'Run Tests' | |
on: | |
pull_request: | |
workflow_dispatch: | |
concurrency: | |
group: ${{ github.workflow }}-${{ github.ref }} | |
cancel-in-progress: true | |
jobs: | |
version-bump: | |
name: 'Version Bump' | |
runs-on: ubuntu-latest | |
steps: | |
- name: 'Check out code' | |
uses: actions/checkout@v3 | |
with: | |
token: ${{ secrets.JENKINS_GITHUB_PAT }} | |
# fetch-depth 0 means deep clone the repo | |
fetch-depth: 0 | |
- name: 'Update version' | |
run: | | |
set -x | |
git config user.name devops | |
git config user.email [email protected] | |
./package/version.sh bump $(git show origin/${GITHUB_BASE_REF}:package/version) | |
./package/version.sh sub | |
if git add --update && git commit --message "Set Version: $(cat package/version)"; then | |
git push origin HEAD:${GITHUB_HEAD_REF} | |
fi | |
code-quality-checks: | |
needs: version-bump | |
name: 'Code Quality Checks' | |
runs-on: ubuntu-latest | |
steps: | |
- name: 'Check out code' | |
uses: actions/checkout@v3 | |
- name: 'Install Poetry' | |
uses: Gr1N/setup-poetry@v8 | |
- name: 'Run code quality checks' | |
run: make check | |
- name: 'Run pyupgrade' | |
run: make pyupgrade | |
build-docs: | |
needs: code-quality-checks | |
name: 'Build Documentation' | |
runs-on: ubuntu-latest | |
steps: | |
- name: 'Check out code' | |
uses: actions/checkout@v3 | |
- name: 'Install Poetry' | |
uses: Gr1N/setup-poetry@v8 | |
- name: 'Build documentation' | |
run: make docs | |
unit-tests: | |
needs: code-quality-checks | |
name: 'Unit Tests' | |
runs-on: ubuntu-latest | |
steps: | |
- name: 'Check out code' | |
uses: actions/checkout@v3 | |
- name: 'Install Poetry' | |
uses: Gr1N/setup-poetry@v8 | |
- name: 'Run unit tests' | |
run: make cov-unit | |
profile: | |
needs: code-quality-checks | |
name: 'Profiling' | |
runs-on: [self-hosted, linux, normal-ephemeral] | |
steps: | |
- name: 'Check out code' | |
uses: actions/checkout@v3 | |
- name: 'Install Python' | |
uses: actions/setup-python@v4 | |
with: | |
python-version: '3.10' | |
- name: 'Install Poetry' | |
uses: Gr1N/setup-poetry@v8 | |
- name: 'Install K' | |
run: | | |
K_VERSION=$(cat deps/k_release) | |
DEB_PACKAGE_NAME=kframework_${K_VERSION}_amd64_ubuntu_jammy.deb | |
wget https://github.com/runtimeverification/k/releases/download/v${K_VERSION}/${DEB_PACKAGE_NAME} | |
sudo apt-get update | |
sudo apt-get -y install ./${DEB_PACKAGE_NAME} | |
kompile --version | |
- name: 'Run profiling' | |
run: | | |
make profile | |
find /tmp/pytest-of-${USER}/pytest-current/ -type f -name '*.prof' | sort | xargs tail -n +1 | |
integration-tests: | |
needs: code-quality-checks | |
name: 'Integration Tests' | |
runs-on: [self-hosted, linux, normal-ephemeral] | |
strategy: | |
matrix: | |
python-version: ['3.10', '3.11'] | |
steps: | |
- name: 'Check out code' | |
uses: actions/checkout@v3 | |
- name: 'Install Python' | |
uses: actions/setup-python@v4 | |
with: | |
python-version: ${{ matrix.python-version }} | |
- name: 'Install Poetry' | |
uses: Gr1N/setup-poetry@v8 | |
- name: 'Install K' | |
run: | | |
K_VERSION=$(cat deps/k_release) | |
DEB_PACKAGE_NAME=kframework_${K_VERSION}_amd64_ubuntu_jammy.deb | |
wget https://github.com/runtimeverification/k/releases/download/v${K_VERSION}/${DEB_PACKAGE_NAME} | |
sudo apt-get update | |
sudo apt-get -y install graphviz ./${DEB_PACKAGE_NAME} | |
kompile --version | |
- name: 'Run integration tests' | |
run: make cov-integration COV_ARGS='-n8' | |
build-on-nix: | |
needs: code-quality-checks | |
name: 'Build on Nix' | |
strategy: | |
matrix: | |
os: [ubuntu-latest, macos-13] | |
target: [pyk-python310, pyk-python311] | |
runs-on: ${{ matrix.os }} | |
steps: | |
- name: 'Check out code' | |
uses: actions/checkout@v3 | |
- name: 'Install Nix/Cachix' | |
uses: cachix/install-nix-action@v19 | |
with: | |
install_url: https://releases.nixos.org/nix/nix-2.13.3/install | |
extra_nix_config: | | |
access-tokens = github.com=${{ secrets.GITHUB_TOKEN }} | |
- uses: cachix/cachix-action@v12 | |
with: | |
name: k-framework | |
authToken: '${{ secrets.CACHIX_PUBLIC_KEY }}' | |
- name: 'Build pyk' | |
run: GC_DONT_GC=1 nix build --print-build-logs .#${{ matrix.target }} |