Skip to content
This repository was archived by the owner on Jul 16, 2025. It is now read-only.

Commit c600af5

Browse files
committed
Build macos cli executable using universal2 python
Signed-off-by: joseph-sentry <[email protected]>
1 parent 01986b6 commit c600af5

File tree

1 file changed

+14
-5
lines changed

1 file changed

+14
-5
lines changed

.github/workflows/release_flow.yml

Lines changed: 14 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -17,10 +17,10 @@ jobs:
1717
- uses: actions/checkout@v3
1818
with:
1919
submodules: true
20-
- name: Set up Python 3.10
20+
- name: Set up Python 3.11
2121
uses: actions/setup-python@v4
2222
with:
23-
python-version: "3.10"
23+
python-version: "3.11"
2424
- name: Install dependencies
2525
run: |
2626
pip install -r requirements.txt
@@ -43,7 +43,12 @@ jobs:
4343
matrix:
4444
include:
4545
- os: macos-latest
46+
env:
47+
CFLAGS: '-arch arm64 -arch x86_64'
4648
TARGET: macos
49+
CMD_REQS: >
50+
mkdir -p pip-packages && cd pip-packages && pip wheel --no-cache-dir -r ../requirements.txt && cd ..
51+
pip install --no-deps --no-index --find-links=pip-packages pip-packages/*
4752
CMD_BUILD: >
4853
STATICCODECOV_LIB_PATH=$(find build/ -maxdepth 1 -type d -name 'lib.*' -print -quit | xargs -I {} sh -c "find {} -type f -name 'staticcodecov*' -print -quit | sed 's|^./||'") &&
4954
pyinstaller --add-binary ${STATICCODECOV_LIB_PATH}:. --hidden-import staticcodecov_languages -F codecov_cli/main.py &&
@@ -52,6 +57,8 @@ jobs:
5257
ASSET_MIME: application/octet-stream
5358
- os: ubuntu-latest
5459
TARGET: ubuntu
60+
CMD_REQS: >
61+
pip install -r requirements.txt
5562
CMD_BUILD: >
5663
STATICCODECOV_LIB_PATH=$(find build/ -maxdepth 1 -type d -name 'lib.*' -print -quit | xargs -I {} sh -c "find {} -type f -name 'staticcodecov*' -print -quit | sed 's|^./||'") &&
5764
pyinstaller --add-binary ${STATICCODECOV_LIB_PATH}:. --hidden-import staticcodecov_languages -F codecov_cli/main.py &&
@@ -60,6 +67,8 @@ jobs:
6067
ASSET_MIME: application/octet-stream
6168
- os: windows-latest
6269
TARGET: windows
70+
CMD_REQS: >
71+
pip install -r requirements.txt
6372
CMD_BUILD: >
6473
pyinstaller --add-binary "build\lib.win-amd64-cpython-310\staticcodecov_languages.cp310-win_amd64.pyd;." --hidden-import staticcodecov_languages -F codecov_cli\main.py &&
6574
Copy-Item -Path ".\dist\main.exe" -Destination ".\dist\codecovcli_windows.exe"
@@ -69,13 +78,13 @@ jobs:
6978
- uses: actions/checkout@v3
7079
with:
7180
submodules: true
72-
- name: Set up Python 3.10
81+
- name: Set up Python 3.11
7382
uses: actions/setup-python@v3
7483
with:
75-
python-version: "3.10"
84+
python-version: "3.11"
7685
- name: Install dependencies
7786
run: |
78-
pip install -r requirements.txt
87+
${{matrix.CMD_REQS}}
7988
python setup.py build
8089
- name: Install pyinstaller
8190
run: pip install pyinstaller

0 commit comments

Comments
 (0)