From 4e6152103ab60bf90f25dcce3a23bd6530a527b3 Mon Sep 17 00:00:00 2001 From: andreasgriffin Date: Sat, 9 Nov 2024 20:33:28 +0100 Subject: [PATCH] just use ubuntu-latest --- .github/workflows/build-tests.yml | 29 ++++++++--------------------- tools/build.py | 14 -------------- 2 files changed, 8 insertions(+), 35 deletions(-) diff --git a/.github/workflows/build-tests.yml b/.github/workflows/build-tests.yml index c44f8a0..08e8bc5 100644 --- a/.github/workflows/build-tests.yml +++ b/.github/workflows/build-tests.yml @@ -8,31 +8,18 @@ on: branches: - main + jobs: build: - runs-on: ubuntu-latest - env: - DOCKER_HOST: tcp://localhost:2375 - services: - docker: - image: docker:19.03.12-dind - options: --privileged - ports: - - 2375:2375 - + runs-on: ubuntu-latest # GitHub-hosted runner with Docker installed steps: - - name: Checkout code - uses: actions/checkout@v3 - - - name: Set up Docker environment - run: | - sudo service docker start - - - name: Set up Python - uses: actions/setup-python@v3 - with: - python-version: '3.10' + - name: Checkout repository + uses: actions/checkout@v3 + - name: Set up Python environment + uses: actions/setup-python@v4 + with: + python-version: '3.10' - name: Setup xvfb (Linux) if: runner.os == 'Linux' diff --git a/tools/build.py b/tools/build.py index 152ead4..a849708 100644 --- a/tools/build.py +++ b/tools/build.py @@ -145,18 +145,6 @@ def build_windows_exe_and_installer_docker( build_commit=build_commit, ) - def set_docker_environment(self): - # Check if running in GitHub Actions - if 'GITHUB_ACTIONS' in os.environ: - # Set DOCKER_HOST only if running in GitHub Actions - os.environ['DOCKER_HOST'] = 'tcp://localhost:2375' - else: - # Optionally, handle local settings or leave as default for local Docker usage - if 'DOCKER_HOST' not in os.environ: - # Set to default Unix socket if not specified, or just omit this block to use system default - os.environ['DOCKER_HOST'] = 'unix:///var/run/docker.sock' - - def build_in_docker( self, docker_image: str, @@ -183,8 +171,6 @@ def build_in_docker( BUILD_UID = PROJECT_ROOT.stat().st_uid BUILD_CACHEDIR = path_build / ".cache" original_dir = os.getcwd() - - self.set_docker_environment() # Initialize DOCKER_BUILD_FLAGS DOCKER_BUILD_FLAGS = ""