-
Notifications
You must be signed in to change notification settings - Fork 38
149 lines (148 loc) · 5.51 KB
/
Copy pathbuild-version.yml
File metadata and controls
149 lines (148 loc) · 5.51 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
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
141
142
143
144
145
146
147
148
149
name: Build Custom Executable (Ubuntu 22.04)
on:
workflow_dispatch:
# schedule:
# - cron: '0 2 * * 0' # Weekly on Sunday at 2 AM UTC
# - cron: '0 2 * * *' # Daily at 2 AM UTC
jobs:
custom-executable-build:
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v6
with:
repository: cdisc-org/cdisc-rules-engine
ref: main
- name: Set up Python
uses: actions/setup-python@v6
with:
python-version: "3.12"
- name: Install dependencies
run: |
pip install --upgrade pip
pip install twine
pip install .
- name: Update CDISC standards cache
env:
CDISC_LIBRARY_API_KEY: ${{ secrets.CDISC_LIBRARY_API_KEY }}
run: |
python core.py update-cache
- name: Build Binary
run: |
pyinstaller --onedir \
--contents-directory "." \
core.py \
--icon=resources/assets/CORE_logo_sm.ico \
--dist ./dist/output/core-ubuntu-22.04 \
--collect-submodules pyreadstat \
--add-data="resources/cache:resources/cache" \
--add-data="resources/templates:resources/templates" \
--add-data="resources/schema:resources/schema" \
--add-data="tests/resources/datasets:tests/resources/datasets" \
--add-data="resources/jsonata:resources/jsonata"
- name: Prepare executable
run: |
cd dist/output/core-ubuntu-22.04/core
chmod +x core
file core # Verify x86_64 architecture
mv core cdisc-core-$(date +%Y%m%d)
echo "Executable ready: $(ls cdisc-core-*)"
- name: Upload Artifact
uses: actions/upload-artifact@v6
with:
name: cdisc-core-ubuntu-22.04
path: dist/output/core-ubuntu-22.04/core/
# name: Build Custom Executable (Windows)
# on:
# workflow_dispatch:
# # schedule:
# # - cron: '0 2 * * 0' # Weekly on Sunday at 2 AM UTC
# # - cron: '0 2 * * *' # Daily at 2 AM UTC
# jobs:
# custom-executable-build-windows:
# runs-on: windows-latest
# steps:
# - uses: actions/checkout@v6
# with:
# repository: cdisc-org/cdisc-rules-engine
# ref: main
# - name: Set up Python
# uses: actions/setup-python@v6
# with:
# python-version: "3.12"
# - name: Install dependencies
# run: |
# pip install --upgrade pip
# pip install twine
# pip install .
# - name: Update CDISC standards cache
# env:
# CDISC_LIBRARY_API_KEY: ${{ secrets.CDISC_LIBRARY_API_KEY }}
# run: |
# python core.py update-cache
# - name: Build Binary (Windows)
# run: pyinstaller --onedir --contents-directory "." core.py --icon=resources/assets/CORE_logo_sm.ico --dist ./dist/output/core-windows --collect-submodules pyreadstat --add-data="resources/cache;resources/cache" --add-data="resources/templates;resources/templates" --add-data="resources/schema;resources/schema" --add-data="tests/resources/datasets;tests/resources/datasets" --add-data="resources/jsonata;resources/jsonata"
# - name: Prepare executable (Windows)
# shell: pwsh
# run: |
# cd dist/output/core-windows/core
# $date = Get-Date -Format "yyyyMMdd"
# Rename-Item core.exe "cdisc-core-$date.exe"
# Write-Output "Executable ready: $(Get-ChildItem cdisc-core-*)"
# - name: Upload Artifact
# uses: actions/upload-artifact@v6
# with:
# name: cdisc-core-windows
# path: dist/output/core-windows/core/
# name: Build Custom Executable (macOS)
# on:
# workflow_dispatch:
# # schedule:
# # - cron: '0 2 * * 0' # Weekly on Sunday at 2 AM UTC
# # - cron: '0 2 * * *' # Daily at 2 AM UTC
# jobs:
# custom-executable-build-macos:
# runs-on: macos-latest
# steps:
# - uses: actions/checkout@v6
# with:
# repository: cdisc-org/cdisc-rules-engine
# ref: main
# - name: Set up Python
# uses: actions/setup-python@v6
# with:
# python-version: "3.12"
# - name: Install dependencies
# run: |
# pip install --upgrade pip
# pip install twine
# pip install .
# - name: Update CDISC standards cache
# env:
# CDISC_LIBRARY_API_KEY: ${{ secrets.CDISC_LIBRARY_API_KEY }}
# run: |
# python core.py update-cache
# - name: Build Binary (macOS)
# run: |
# pyinstaller --onedir \
# --contents-directory "." \
# core.py \
# --icon=resources/assets/CORE_logo_sm.icns \
# --dist ./dist/output/core-macos \
# --collect-submodules pyreadstat \
# --add-data="resources/cache:resources/cache" \
# --add-data="resources/templates:resources/templates" \
# --add-data="resources/schema:resources/schema" \
# --add-data="tests/resources/datasets:tests/resources/datasets" \
# --add-data="resources/jsonata:resources/jsonata"
# - name: Prepare executable (macOS)
# run: |
# cd dist/output/core-macos/core
# chmod +x core
# file core # Verify architecture
# mv core cdisc-core-$(date +%Y%m%d)
# echo "Executable ready: $(ls cdisc-core-*)"
# - name: Upload Artifact
# uses: actions/upload-artifact@v6
# with:
# name: cdisc-core-macos
# path: dist/output/core-macos/core/