-
Notifications
You must be signed in to change notification settings - Fork 1
72 lines (63 loc) · 2.13 KB
/
package.yml
File metadata and controls
72 lines (63 loc) · 2.13 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
name: Simple Package — Sequential macOS arm64 & Windows x64
on:
workflow_dispatch: # you can also manually trigger this workflow
push:
branches:
- main
jobs:
build-macos-arm64:
name: Build macOS arm64
runs-on: macos-latest
steps:
- name: Check out
uses: actions/checkout@v4
- name: Show runner arch
run: uname -m || true
- name: Setup Python
uses: actions/setup-python@v4
with:
python-version: "3.11"
# Exercise 1: Implement dependency installation here
- name: Install deps
run: |
python -m pip install --upgrade pip
echo "TODO: Achieve pip requirements installation over here"
# Remember to add a -n parameter to name the output binary appropriately for each platform
- name: Build with PyInstaller (macOS arm64)
run: |
pyinstaller --onefile app/hello.py -n hello-macos-arm64
- name: Debug dist
run: ls -la dist || true
- name: Upload macOS artifact
uses: actions/upload-artifact@v4
with:
name: hello-macos-arm64
path: dist/hello-macos-arm64
build-windows-x64:
name: Build Windows x64
runs-on: windows-latest
steps:
- name: Check out
uses: actions/checkout@v4
- name: Setup Python
uses: actions/setup-python@v4
with:
python-version: "3.11"
- name: Install deps
run: |
python -m pip install --upgrade pip
pip install -r requirements.txt
# Exercise 2: Implement Windows build steps here
# You can refer to the macOS build steps above for guidance
# - name: Build with PyInstaller (Windows x64)
# ...
- name: Debug dist
shell: pwsh
run: dir dist || true
# Exercise 3: Implement artifact upload here
# - name: Upload Windows artifact
# uses: actions/upload-artifact@v4
# with:
# name: hello-windows-x64
# path: # TODO: Specify the path to the Windows build artifact here.
# it is a file with .exe extension named by you under `dist/`, generated in Exercise 2