forked from indygreg/PyOxidizer
-
Notifications
You must be signed in to change notification settings - Fork 0
140 lines (123 loc) · 4.21 KB
/
pyoxidizer.yml
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
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
# For the spot tests, we purposefully perform these on separate jobs
# because we don't want a Python or Rust install from the build environment
# to impact the testing.
on:
push:
branches-ignore:
- 'ci-test'
tags-ignore:
- '**'
pull_request:
schedule:
- cron: '13 15 * * *'
workflow_dispatch:
jobs:
pyoxidizer-exes:
uses: ./.github/workflows/build-exe.yml
with:
bin: pyoxidizer
secrets:
AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }}
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
pyoxidizer-linux-x86_64-bin-check:
needs:
- pyoxidizer-exes
runs-on: 'ubuntu-22.04'
steps:
- name: Install musl compiler
run: |
sudo apt install -y --no-install-recommends musl-tools
- name: Download Executable
uses: actions/download-artifact@v3
with:
name: exe-pyoxidizer-x86_64-unknown-linux-musl
- name: Spot Test (Native Build)
run: |
chmod +x pyoxidizer
./pyoxidizer init-config-file myapp
./pyoxidizer build --path myapp
- name: Spot Test (musl Cross)
run: |
./pyoxidizer build --path myapp --target-triple x86_64-unknown-linux-musl
pyoxidizer-macos-universal-exe-check:
needs:
- pyoxidizer-exes
runs-on: 'macos-12'
steps:
- name: Download macOS Executable
uses: actions/download-artifact@v3
with:
name: exe-pyoxidizer-macos-universal
path: macos-universal
- name: Spot Test (Native Build)
run: |
find . -type f
mv macos-universal/pyoxidizer .
chmod +x pyoxidizer
./pyoxidizer init-config-file myapp
./pyoxidizer build --path myapp
- name: Spot Test (aarch64 Cross Build)
run: |
./pyoxidizer build --path myapp --target-triple aarch64-apple-darwin
pyoxidizer-windows-exe-check:
strategy:
fail-fast: false
matrix:
config:
- host_triple: 'i686-pc-windows-msvc'
target_triple: 'x86_64-pc-windows-msvc'
- host_triple: 'x86_64-pc-windows-msvc'
target_triple: 'i686-pc-windows-msvc'
needs:
- pyoxidizer-exes
runs-on: 'windows-2022'
steps:
- name: Download Windows Executable
uses: actions/download-artifact@v3
with:
name: exe-pyoxidizer-i686-pc-windows-msvc
path: i686-pc-windows-msvc/
- name: Download Windows Executable
uses: actions/download-artifact@v3
with:
name: exe-pyoxidizer-x86_64-pc-windows-msvc
path: x86_64-pc-windows-msvc/
- name: Spot Test (Native Build)
run: |
${{ matrix.config.host_triple }}/pyoxidizer.exe init-config-file myapp
${{ matrix.config.host_triple }}/pyoxidizer.exe build --path myapp
- name: Spot Test (Cross-Compile Build)
run: |
${{ matrix.config.host_triple }}/pyoxidizer.exe build --path myapp --target-triple ${{ matrix.config.target_triple }}
pyoxidizer-windows-installer:
needs:
- pyoxidizer-exes
runs-on: 'windows-2022'
env:
IN_CI: '1'
steps:
- uses: actions/checkout@v4
- name: Download Windows Executable
uses: actions/download-artifact@v3
with:
name: exe-pyoxidizer-i686-pc-windows-msvc
path: dist/i686-pc-windows-msvc/
- name: Download Windows Executable
uses: actions/download-artifact@v3
with:
name: exe-pyoxidizer-x86_64-pc-windows-msvc
path: dist/x86_64-pc-windows-msvc/
# We can use the built/downloaded pyoxidizer.exe to package itself. Nice.
# Building the exe installer will build the MSI installers. 2 birds 1 stone.
- name: Build Installers
run: |
dist/x86_64-pc-windows-msvc/pyoxidizer.exe build --var-env IN_CI IN_CI --release --target-triple x86_64-pc-windows-msvc exe_installer
move build/x86_64-pc-windows-msvc/release/*/*.msi .
move build/x86_64-pc-windows-msvc/release/*/*.exe .
- name: Upload installers
uses: actions/upload-artifact@v3
with:
name: pyoxidizer-windows_installers
path: |
*.exe
*.msi