diff --git a/pyk/.github/workflows/test-pr.yml b/pyk/.github/workflows/test-pr.yml index 4add29e02f0..da3c68c2e2b 100644 --- a/pyk/.github/workflows/test-pr.yml +++ b/pyk/.github/workflows/test-pr.yml @@ -84,36 +84,49 @@ jobs: integration-tests: needs: code-quality-checks name: 'Integration Tests' - runs-on: [self-hosted, linux, normal-ephemeral] + runs-on: [self-hosted, linux, normal] 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' + - name: 'Build Docker image' 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' + COMMIT=$(git rev-parse --short=7 HEAD) + K_VERSION=$(cut --delim=v --field=2 deps/k_release) + + docker build . \ + --build-arg PYTHON_VERSION=${{ matrix.python-version }} \ + --build-arg K_VERSION=${K_VERSION} \ + --tag runtimeverificationinc/pyk-ci:${COMMIT} + + docker run \ + --name pyk-ci \ + --rm \ + --interactive \ + --tty \ + --detach \ + --workdir /home/user \ + runtimeverificationinc/pyk-ci:${COMMIT} + + docker cp . pyk-ci:/home/user + docker exec pyk-ci chown -R user:user /home/user + - name: 'Set Python version' + run: docker exec --user user pyk-ci poetry env use ${{ matrix.python-version }} + - name: 'Build and run integration tests' + run: docker exec --user user pyk-ci make cov-integration COV_ARGS=-n8 + - name: 'Tear down Docker container' + if: always() + run: | + docker stop --time=0 pyk-ci build-on-nix: needs: code-quality-checks name: 'Build on Nix' strategy: matrix: - os: [ubuntu-latest, macos-11] + os: [ubuntu-latest, macos-13] target: [pyk-python310, pyk-python311] runs-on: ${{ matrix.os }} steps: diff --git a/pyk/Dockerfile b/pyk/Dockerfile index 27d703e5a0f..4f8c19cdc51 100644 --- a/pyk/Dockerfile +++ b/pyk/Dockerfile @@ -4,12 +4,12 @@ FROM runtimeverificationinc/kframework-k:ubuntu-${K_DISTRO}-${K_VERSION} ARG PYTHON_VERSION=3.10 -RUN apt-get -y update \ - && apt-get -y install \ - curl \ - graphviz \ - python${PYTHON_VERSION} \ - python${PYTHON_VERSION}-dev \ +RUN apt-get -y update \ + && apt-get -y install \ + curl \ + graphviz \ + python$PYTHON_VERSION \ + python$PYTHON_VERSION-dev \ && apt-get -y clean RUN curl -sSL https://install.python-poetry.org | POETRY_HOME=/usr python3 - \ diff --git a/pyk/package/version b/pyk/package/version index d6157ba83fe..2cdb05cc3a3 100644 --- a/pyk/package/version +++ b/pyk/package/version @@ -1 +1 @@ -0.1.337 +0.1.338 diff --git a/pyk/pyproject.toml b/pyk/pyproject.toml index 21d5ae291ef..811a0f6567d 100644 --- a/pyk/pyproject.toml +++ b/pyk/pyproject.toml @@ -4,7 +4,7 @@ build-backend = "poetry.core.masonry.api" [tool.poetry] name = "pyk" -version = "0.1.337" +version = "0.1.338" description = "" authors = [ "Runtime Verification, Inc. ",