Skip to content

Use container for python 3.6 compatibility issue#400

Merged
geatpy-dev merged 9 commits into
geatpy-dev:masterfrom
WhiskyChoy:patch-3
Feb 5, 2026
Merged

Use container for python 3.6 compatibility issue#400
geatpy-dev merged 9 commits into
geatpy-dev:masterfrom
WhiskyChoy:patch-3

Conversation

@WhiskyChoy
Copy link
Copy Markdown
Contributor

No description provided.

Copilot AI review requested due to automatic review settings February 5, 2026 13:17
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This pull request modifies the CI/CD workflow to address Python 3.6 compatibility issues by using a Docker container for Linux builds. The workflow now runs Linux tests inside an ubuntu:20.04 container while keeping Windows tests on the native runner.

Changes:

  • Switched Linux OS from ubuntu-20.04 to ubuntu-latest with a container override to ubuntu:20.04
  • Split all workflow steps into OS-specific variants (Linux vs Windows) with explicit shell specifications
  • Changed Python installation approach: manual installation via apt-get for Linux, actions/setup-python for Windows

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread .github/workflows/build_and_test.yml Outdated
Comment thread .github/workflows/build_and_test.yml Outdated
Comment on lines +46 to +47
apt-get update
apt-get install -y python3.6 python3.6-dev python3-pip git
Copy link

Copilot AI Feb 5, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The ubuntu:20.04 container image is minimal and does not include git by default. The git commands in the "Fetch core files from open_dev branch" step (lines 32-33) will execute before git is installed here on line 47. This will cause the workflow to fail. Consider either installing necessary tools (including git) as the first step after checkout, or using a container image that includes git pre-installed, such as ubuntu:20.04 with git layer or a custom image.

Copilot uses AI. Check for mistakes.
Comment thread .github/workflows/build_and_test.yml Outdated
Comment thread .github/workflows/build_and_test.yml Outdated
Comment on lines 28 to 40
- name: Fetch core files from open_dev branch (Linux)
if: runner.os == 'Linux'
shell: bash
run: |
git fetch origin open_dev
git checkout origin/open_dev -- _core

- name: Fetch core files from open_dev branch (Windows)
if: runner.os == 'Windows'
shell: pwsh
run: |
git fetch origin open_dev
git checkout origin/open_dev -- _core
Copy link

Copilot AI Feb 5, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The duplicated logic for fetching core files between Linux and Windows steps is identical except for the shell specification. Since both steps execute the same git commands, consider consolidating them into a single step with conditional shell specification, or remove the shell specification and rely on the appropriate default shell for each OS. This would improve maintainability.

Copilot uses AI. Check for mistakes.
Comment thread .github/workflows/build_and_test.yml Outdated
Comment on lines +46 to +47
apt-get update
apt-get install -y python3.6 python3.6-dev python3-pip git
Copy link

Copilot AI Feb 5, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

When running actions/checkout inside a container, git may encounter "dubious ownership" errors due to UID mismatches between the container user and the repository owner. Consider adding 'git config --global --add safe.directory /github/workspace' or similar after git installation and before any git operations, or ensure the container runs as the correct user. This is a common issue when using containers in GitHub Actions.

Copilot uses AI. Check for mistakes.
Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@copilot open a new pull request to apply changes based on this feedback

Comment thread .github/workflows/build_and_test.yml Outdated
WhiskyChoy and others added 8 commits February 5, 2026 21:21
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Updated the installation process for Python 3.6 and its dependencies.
Add environment variables for non-interactive installation and timezone setup.
Replaced Python installation method with source compilation and added necessary dependencies.
@geatpy-dev geatpy-dev merged commit 75ddfd6 into geatpy-dev:master Feb 5, 2026
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants