Skip to content

Commit

Permalink
add other OS
Browse files Browse the repository at this point in the history
  • Loading branch information
tqtg committed Apr 3, 2024
1 parent b354eb2 commit 254b01f
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 1 deletion.
2 changes: 1 addition & 1 deletion .github/workflows/python-package.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ jobs:
strategy:
fail-fast: false
matrix:
os: [windows-latest]
os: [windows-latest, ubuntu-latest, macos-13, macos-14]
python-version: ["3.8", "3.9", "3.10", "3.11", "3.12"]

steps:
Expand Down
7 changes: 7 additions & 0 deletions .github/workflows/python-publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ jobs:
- name: Setup Python ${{ matrix.python-version }}
if: ${{ (matrix.os != 'macos-14') || ((matrix.os == 'macos-14') && (matrix.python-version != '3.8') && (matrix.python-version != '3.9')) }}
uses: actions/setup-python@v5
id: pysetup
with:
python-version: ${{ matrix.python-version }}
cache: 'pip'
Expand All @@ -40,6 +41,12 @@ jobs:
curl https://bootstrap.pypa.io/get-pip.py -o get-pip.py
python${{ matrix.python-version }} get-pip.py
- name: Create Python alias for Windows
if: matrix.os == 'windows-latest'
run: |
$newPath = "${{ steps.pysetup.outputs.python-path }}".Replace("python.exe", "python${{ matrix.python-version }}.exe")
New-Item -ItemType HardLink -Path "$newPath" -Value "${{ steps.pysetup.outputs.python-path }}"
- name: Display Python and Pip versions
run: |
python${{ matrix.python-version }} -c "import sys; print(sys.version)"
Expand Down

0 comments on commit 254b01f

Please sign in to comment.