Skip to content

Commit 85d8f67

Browse files
authored
Merge pull request #510 from MEDomicsLab/develop
V1.6.0 merge
2 parents 277bdf3 + 2718dce commit 85d8f67

File tree

127 files changed

+21431
-969
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

127 files changed

+21431
-969
lines changed

.DS_Store

-2 KB
Binary file not shown.

.github/workflows/automaticBuilding.yml

Lines changed: 218 additions & 75 deletions
Large diffs are not rendered by default.

.github/workflows/automaticBuildingLinux.yml

Lines changed: 13 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ permissions:
77
contents: write
88
jobs:
99
build-linux-ubuntu:
10-
runs-on: ubuntu-20.04
10+
runs-on: ubuntu-22.04
1111

1212
steps:
1313
- name: Checkout code
@@ -53,18 +53,14 @@ jobs:
5353
id: get-tag
5454
run: |
5555
VERSION=${GITHUB_REF/refs\/tags\//}
56-
echo "::set-output name=VERSION::${VERSION#u}"
57-
58-
- name: Rename Linux
59-
run: mv ./build/dist/MEDomicsLab-${{ env.VERSION }}-linux.deb ./build/dist/MEDomicsLab-${{ env.VERSION }}-ubuntu.deb
60-
env:
61-
VERSION: ${{ steps.get-tag.outputs.VERSION }}
56+
echo "VERSION=${VERSION#v}" >> "$GITHUB_OUTPUT"
6257
6358
- name: Archive Linux
6459
uses: actions/upload-artifact@v4
6560
with:
6661
name: linux-built-ubuntu
67-
path: ./build/dist/MEDomicsLab-${{ env.VERSION }}-ubuntu.deb
62+
path: ./build/dist/MEDomics-${{ env.VERSION }}-linux.deb
63+
compression-level: 0
6864
env:
6965
VERSION: ${{ steps.get-tag.outputs.VERSION }}
7066

@@ -96,28 +92,30 @@ jobs:
9692
ls -R
9793
9894
- name: zip Linux
99-
run: zip -r MEDomicsLab-PythonEnv-linux.zip ./requirements.txt ./create_conda_env_linux.sh
95+
run: zip -r MEDomics-PythonEnv-linux.zip ./requirements.txt ./create_conda_env_linux.sh
10096

10197
- name: Get tag name
10298
id: get-tag
10399
run: |
104100
VERSION=${GITHUB_REF/refs\/tags\//}
105-
echo "::set-output name=VERSION::${VERSION#u}"
101+
echo "VERSION=${VERSION#v}" >> "$GITHUB_OUTPUT"
106102
107103
- name: Publish to GitHub
108104
uses: softprops/action-gh-release@v1
109105
with:
110106
files: |
111-
./MEDomicsLab-${{ env.VERSION }}-ubuntu.deb
112-
./MEDomicsLab-PythonEnv-linux.zip
113-
name: MEDomicsLab-${{ env.VERSION }}
107+
./MEDomics-${{ env.VERSION }}-linux.deb
108+
./MEDomics-PythonEnv-linux.zip
109+
name: MEDomics-${{ env.VERSION }}
114110
body: |
115-
MEDomicsLab-${{ env.VERSION }}
116-
This is a full release of MEDomicsLab. This release includes the MEDomicsLab application and the Python environment.
111+
MEDomics-${{ env.VERSION }}
112+
This is a full release of MEDomics. This release includes the MEDomics platform and the Python environment.
117113
Refer to the [Documentation](https://medomics-udes.gitbook.io/medomicslab-docs/)
118114
${{ github.ref }}
119115
draft: true
120116
prerelease: false
121117
token: ${{ secrets.GITHUB_TOKEN }}
122118
env:
119+
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
120+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
123121
VERSION: ${{ steps.get-tag.outputs.VERSION }}

.github/workflows/automaticBuildingMac.yml

Lines changed: 136 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -8,12 +8,58 @@ permissions:
88
jobs:
99
build-mac:
1010
runs-on: macos-latest
11+
env:
12+
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
1113

1214
steps:
1315
- name: Checkout code
1416
uses: actions/checkout@v4
1517
with:
1618
submodules: recursive
19+
fetch-depth: 0 # Fetch full history for branches
20+
21+
- name: Keys and certificates
22+
env:
23+
APPLE_CERT_DATA: ${{ secrets.CSC_INSTALLER_LINK }}
24+
APPLE_CERT_PASSWORD: ${{ secrets.CSC_INSTALLER_KEY_PASSWORD }}
25+
DEVELOPER_APP_CER: ${{ secrets.CSC_LINK}}
26+
DEVELOPER_APP_KEY: ${{ secrets.CSC_KEY_PASSWORD }}
27+
28+
run: |
29+
CERTIFICATE_PATH=$RUNNER_TEMP/build_certificate.p12
30+
echo -n "$APPLE_CERT_DATA" | base64 --decode -o certificate_installer.p12
31+
echo -n "$DEVELOPER_APP_CER" | base64 --decode -o certificate_application.p12
32+
33+
KEYCHAIN_PATH=$RUNNER_TEMP/app-signing.keychain-db
34+
security create-keychain -p "${{ secrets.CSC_KEY_PASSWORD }}" $KEYCHAIN_PATH
35+
security set-keychain-settings -lut 21600 $KEYCHAIN_PATH
36+
security unlock-keychain -p "${{ secrets.CSC_KEY_PASSWORD }}" $KEYCHAIN_PATH
37+
38+
security import certificate_installer.p12 -P "${{ secrets.CSC_KEY_PASSWORD }}" -A -t cert -f pkcs12 -k $KEYCHAIN_PATH
39+
security import certificate_application.p12 -P "${{ secrets.CSC_KEY_PASSWORD }}" -A -t cert -f pkcs12 -k $KEYCHAIN_PATH
40+
security list-keychain -d user -s $KEYCHAIN_PATH
41+
# Store as a keychain profile (for signing)
42+
43+
- name: keychain profile
44+
env:
45+
APPLE_NOTARY_USER: ${{ secrets.APPLE_ID }}
46+
APPLE_NOTARY_PASSWORD: ${{ secrets.APPLE_ID_PASSWORD }}
47+
APPLE_TEAM_ID: ${{ secrets.APPLE_TEAM_ID }}
48+
run: |
49+
xcrun notarytool store-credentials "notarytool-password" --apple-id "$APPLE_NOTARY_USER" --team-id "$APPLE_TEAM_ID" --password "$APPLE_NOTARY_PASSWORD"
50+
51+
- name: Checking out the correct branches for submodules
52+
run: |
53+
git submodule foreach '
54+
if [ "$name" = "pythonCode/submodules/MEDimage" ]; then
55+
git fetch origin && git checkout -B dev_lab origin/dev_lab && git pull origin dev_lab
56+
elif [ "$name" = "pythonCode/submodules/MEDprofiles" ]; then
57+
git fetch origin && git checkout -B fusion_MEDomicsLab origin/fusion_MEDomicsLab && git pull origin fusion_MEDomicsLab
58+
else
59+
echo "No branch specified for $name"
60+
fi
61+
'
62+
1763
- name: Setup Go
1864
uses: actions/setup-go@v4
1965
with:
@@ -37,18 +83,8 @@ jobs:
3783
uses: actions/setup-python@v2
3884
with:
3985
python-version: 3.9
40-
- name: Bash python 1st try
41-
run: |
42-
echo $PATH
43-
python --version
44-
which python
45-
- name: Bash python 2nd try
46-
run: |
47-
echo $PATH
48-
python --version
49-
which python
50-
shell: bash {0}
51-
- name: Bash python 3rd try
86+
87+
- name: Bash python version
5288
run: |
5389
echo $PATH
5490
python --version
@@ -67,8 +103,6 @@ jobs:
67103
- name: Install dependencies
68104
run: npm install
69105

70-
- uses: actions/checkout@v4
71-
72106
- name: Cache node modules
73107
id: cache-npm
74108
uses: actions/cache@v3
@@ -103,20 +137,80 @@ jobs:
103137
- name: Allocate more memory
104138
run: export NODE_OPTIONS=--max-old-space-size=8192
105139

106-
- name: Build for Mac
107-
run: npm run build:mac
108-
109140
- name: Get tag name
110141
id: get-tag
111142
run: |
112143
VERSION=${GITHUB_REF/refs\/tags\//}
113-
echo "::set-output name=VERSION::${VERSION#m}"
144+
echo "VERSION=${VERSION#v}" >> "$GITHUB_OUTPUT"
145+
146+
- name: dotenv file
147+
run: |
148+
echo "DEVELOPER_ID_APP='${{ secrets.DEVELOPER_ID_APP }}'" >> .env
149+
echo "DEVELOPER_ID_INSTALLER='${{ secrets.DEVELOPER_ID_INSTALLER }}'" >> .env
150+
151+
- name: Build for Mac
152+
env:
153+
APPLE_ID: ${{ secrets.APPLE_ID }}
154+
APPLE_APP_SPECIFIC_PASSWORD: ${{ secrets.APPLE_ID_PASSWORD }}
155+
APPLE_TEAM_ID: ${{ secrets.APPLE_TEAM_ID }}
156+
CSC_LINK: ${{ secrets.CSC_LINK }}
157+
CSC_KEY_PASSWORD: ${{ secrets.CSC_KEY_PASSWORD }}
158+
CSC_INSTALLER_LINK: ${{ secrets.CSC_INSTALLER_LINK }}
159+
CSC_INSTALLER_KEY_PASSWORD: ${{ secrets.CSC_INSTALLER_KEY_PASSWORD }}
160+
run: |
161+
npm run build:mac
162+
163+
- name: Notarize Mac .pkg
164+
id: notarize-pkg
165+
continue-on-error: true
166+
env:
167+
VERSION: ${{ steps.get-tag.outputs.VERSION }}
168+
run: |
169+
xcrun notarytool submit build/dist/MEDomics-${{ env.VERSION }}-mac.pkg --keychain-profile "notarytool-password" --wait
170+
171+
- name: staple
172+
continue-on-error: true
173+
env:
174+
VERSION: ${{ steps.get-tag.outputs.VERSION }}
175+
APPLE_ID: ${{ secrets.APPLE_ID }}
176+
APPLE_APP_SPECIFIC_PASSWORD: ${{ secrets.APPLE_ID_PASSWORD }}
177+
APPLE_TEAM_ID: ${{ secrets.APPLE_TEAM_ID }}
178+
run: |
179+
xcrun stapler staple build/dist/MEDomics-${{ env.VERSION }}-mac.pkg
114180
115181
- name: Archive Mac
116182
uses: actions/upload-artifact@v4
117183
with:
118184
name: mac-built
119-
path: ./build/dist/MEDomicsLab-${{ env.VERSION }}-mac.dmg
185+
path: ./build/dist/MEDomics-${{ env.VERSION }}-mac.pkg
186+
compression-level: 0
187+
env:
188+
VERSION: ${{ steps.get-tag.outputs.VERSION }}
189+
190+
- name: Archive Mac
191+
uses: actions/upload-artifact@v4
192+
with:
193+
name: mac-built-pkg
194+
path: ./build/dist/MEDomics-${{ env.VERSION }}-mac.pkg
195+
compression-level: 0
196+
env:
197+
VERSION: ${{ steps.get-tag.outputs.VERSION }}
198+
199+
- name: Archive Mac DMG
200+
uses: actions/upload-artifact@v4
201+
with:
202+
name: mac-built-dmg
203+
path: ./build/dist/MEDomics-${{ env.VERSION }}-mac.dmg
204+
compression-level: 0
205+
env:
206+
VERSION: ${{ steps.get-tag.outputs.VERSION }}
207+
208+
- name: Archive Mac DMG
209+
uses: actions/upload-artifact@v4
210+
with:
211+
name: mac-built-zip
212+
path: ./build/dist/MEDomics-${{ env.VERSION }}-mac.zip
213+
compression-level: 0
120214
env:
121215
VERSION: ${{ steps.get-tag.outputs.VERSION }}
122216

@@ -128,10 +222,20 @@ jobs:
128222
- name: Checkout code
129223
uses: actions/checkout@v4
130224

131-
- name: Download Mac
225+
- name: Download Mac PKG
132226
uses: actions/download-artifact@v4
133227
with:
134-
name: mac-built
228+
name: mac-built-pkg
229+
230+
- name: Download Mac DMG
231+
uses: actions/download-artifact@v4
232+
with:
233+
name: mac-built-dmg
234+
235+
- name: Download Mac ZIP
236+
uses: actions/download-artifact@v4
237+
with:
238+
name: mac-built-zip
135239

136240
- name: Install zip
137241
run: sudo apt-get install zip
@@ -148,27 +252,31 @@ jobs:
148252
ls -R
149253
150254
- name: zip Mac
151-
run: zip -r MEDomicsLab-PythonEnv-mac.zip ./create_conda_env_mac.sh ./requirements_mac.txt
255+
run: zip -r MEDomics-PythonEnv-mac.zip ./create_conda_env_mac.sh ./requirements_mac.txt
256+
152257
- name: Get tag name
153258
id: get-tag
154259
run: |
155260
VERSION=${GITHUB_REF/refs\/tags\//}
156-
echo "::set-output name=VERSION::${VERSION#m}"
261+
echo "VERSION=${VERSION#v}" >> "$GITHUB_OUTPUT"
157262
158263
- name: Publish to GitHub
159264
uses: softprops/action-gh-release@v1
160265
with:
161266
files: |
162-
./MEDomicsLab-${{ env.VERSION }}-mac.dmg
163-
./MEDomicsLab-PythonEnv-mac.zip
164-
name: MEDomicsLab-${{ env.VERSION }}
267+
./MEDomics-${{ env.VERSION }}-mac.pkg
268+
./MEDomics-${{ env.VERSION }}-mac.dmg
269+
./MEDomics-${{ env.VERSION }}-mac.zip
270+
name: MEDomics-${{ env.VERSION }}
165271
body: |
166-
MEDomicsLab-${{ env.VERSION }}
167-
This is a full release of MEDomicsLab. This release includes the MEDomicsLab application and the Python environment.
272+
MEDomics-${{ env.VERSION }}
273+
This is a full release of MEDomics. This release includes the MEDomics platform and the Python environment.
168274
Refer to the [Documentation](https://medomics-udes.gitbook.io/medomicslab-docs/)
169275
${{ github.ref }}
170276
draft: true
171277
prerelease: false
172278
token: ${{ secrets.GITHUB_TOKEN }}
173279
env:
280+
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
281+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
174282
VERSION: ${{ steps.get-tag.outputs.VERSION }}

0 commit comments

Comments
 (0)