Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 0 additions & 4 deletions .github/workflows/docker.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,9 +26,6 @@ jobs:
- '3.10'
- '3.11'
- '3.12'
include:
- python-impl: pypy
python-version: '3.10'
steps:
- name: Checkout
uses: actions/checkout@v3
Expand Down Expand Up @@ -96,7 +93,6 @@ jobs:
run: docker run --rm ${{ env.TEST_TAG }} quick_test --data / --testnet
- name: Build and push
uses: docker/build-push-action@v3
continue-on-error: ${{ matrix.python-impl == 'pypy' }} # PyPy is not first-class and has been causing some build failures
if: ${{ !env.ACT }} # Skip this step when testing locally with https://github.com/nektos/act
with:
context: .
Expand Down
4 changes: 0 additions & 4 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,10 +26,6 @@ jobs:
'python': ['3.10', '3.11', '3.12'],
# available OS's: https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions#jobsjob_idruns-on
'os': ['ubuntu-22.04', 'macos-12', 'windows-2022'],
'include': [
# XXX: tests fail on these, not sure why, when running them individually each on passes, but not on `make tests`
# {'os': 'ubuntu-22.04', 'python': 'pypy-3.10'},
],
}
# this is the fastest one:
reduced_matrix = {
Expand Down
36 changes: 0 additions & 36 deletions Dockerfile.pypy

This file was deleted.

4 changes: 0 additions & 4 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -134,10 +134,6 @@ endif
docker: $(docker_dir)/Dockerfile
docker build$(docker_build_flags) -t $(docker_tag) $(docker_dir)

.PHONY: docker-pypy
docker-pypy: $(docker_dir)/Dockerfile.pypy
docker build$(docker_build_flags) -f Dockerfile.pypy -t $(docker_tag) $(docker_dir)

.PHONY: docker-push
docker-push: docker
docker tag $(docker_tag) hathornetwork/hathor-core:$(docker_subtag)
Expand Down
17 changes: 3 additions & 14 deletions extras/github/docker.py
Original file line number Diff line number Diff line change
Expand Up @@ -89,18 +89,9 @@ def extract_pyver(filename):
for line in open(filename).readlines():
if line.startswith('ARG PYTHON'):
return line.split('=')[1].strip()
dockerfile_cpython = 'Dockerfile'
dockerfile_pypy = 'Dockerfile.pypy'
default_python = 'python' + extract_pyver(dockerfile_cpython)
default_pypy = 'pypy' + extract_pyver(dockerfile_pypy)

# Set which Dockerfile to use based on the versions matrix
if MATRIX_PYTHON_IMPL == 'pypy':
dockerfile = dockerfile_pypy
suffix = 'pypy' + MATRIX_PYTHON_VERSION
else:
dockerfile = dockerfile_cpython
suffix = 'python' + MATRIX_PYTHON_VERSION
dockerfile = 'Dockerfile'
default_python = 'python' + extract_pyver(dockerfile)
suffix = 'python' + MATRIX_PYTHON_VERSION

# Build the tag list

Expand All @@ -116,8 +107,6 @@ def extract_pyver(filename):
if suffix == default_python:
tags.add(base_version)
output['slack-notification-version'] = base_version
elif suffix == default_pypy:
tags.add(base_version + '-pypy')

# Check if this is a stable release
if re.match(r'^v[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}$', base_version):
Expand Down
32 changes: 0 additions & 32 deletions extras/github/test_docker.py
Original file line number Diff line number Diff line change
Expand Up @@ -165,35 +165,3 @@ def test_release_default_python(self):
self.assertIn('mock_image:latest', output['tags'].split(','))
self.assertEqual(output['push'], 'true')
self.assertEqual(output['dockerfile'], 'Dockerfile')

def test_release_non_default_python(self):
os.environ.update({
'GITHUB_REF': 'refs/tags/v0.53.0',
'GITHUB_EVENT_NAME': 'push',
'GITHUB_SHA': '55629a7d0ae267cdd27618f452e9f1ad6764fd43',
'GITHUB_EVENT_DEFAULT_BRANCH': 'master',
'GITHUB_EVENT_NUMBER': '',
'MATRIX_PYTHON_IMPL': 'pypy',
'MATRIX_PYTHON_VERSION': '3.8',
'SECRETS_DOCKERHUB_IMAGE': 'mock_image',
'SECRETS_GHCR_IMAGE': '',
})

output, base_version, is_release_candidate, overwrite_hathor_core_version = prep_base_version(os.environ)

self.assertTrue(overwrite_hathor_core_version)
self.assertFalse(is_release_candidate)
self.assertFalse(output['disable-slack-notification'])
self.assertEqual(base_version, 'v0.53.0')

output = prep_tags(os.environ, base_version, is_release_candidate)

self.assertNotIn('slack-notification-version', output)
self.assertEqual(output['version'], 'v0.53.0-pypy3.8')
self.assertEqual(output['login-dockerhub'], 'true')
self.assertEqual(output['login-ghcr'], 'false')
self.assertEqual(len(output['tags'].split(',')), 2)
self.assertIn('mock_image:v0.53-pypy3.8', output['tags'].split(','))
self.assertIn('mock_image:v0.53.0-pypy3.8', output['tags'].split(','))
self.assertEqual(output['push'], 'true')
self.assertEqual(output['dockerfile'], 'Dockerfile.pypy')