Skip to content

Commit 325ce2f

Browse files
authored
Merge pull request #21 from easyScience/develop
Merge develop to main for 0.0.2
2 parents 1527d5c + aee5263 commit 325ce2f

Some content is hidden

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

46 files changed

+1475
-1107
lines changed

.github/workflows/build.yml

Lines changed: 153 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,153 @@
1+
name: build macOS, Linux, Windows
2+
3+
on: [push, pull_request]
4+
5+
jobs:
6+
build:
7+
if: "!contains(github.event.head_commit.message, '[ci skip]')"
8+
9+
timeout-minutes: 40
10+
11+
runs-on: ${{ matrix.os }}
12+
13+
strategy:
14+
matrix:
15+
os: [macos-10.15, ubuntu-20.04, windows-2019]
16+
17+
steps:
18+
- name: Cancel previous workflow runs
19+
uses: n1hility/cancel-previous-runs@v2
20+
with:
21+
token: ${{ secrets.GITHUB_TOKEN }}
22+
23+
- name: Check-out repository
24+
uses: actions/checkout@v2
25+
26+
- name: Set up access to private repos
27+
uses: webfactory/[email protected]
28+
with:
29+
ssh-private-key: ${{ secrets.GH_WEBFACTORY_KEY }}
30+
31+
- name: Set up non-Python dependences (Linux)
32+
if: runner.os == 'Linux'
33+
run: |
34+
sudo apt-get -o Acquire::Retries=3 update
35+
sudo apt-get -o Acquire::Retries=3 install libxcb-xinerama0
36+
sudo apt-get -o Acquire::Retries=3 install libxcb-icccm4 libxcb-image0 libxcb-keysyms1 libxcb-randr0 libxcb-render-util0 libxcb-xfixes0
37+
sudo apt-get -o Acquire::Retries=3 install libpulse-mainloop-glib0
38+
# sudo apt-get install libgfortran4
39+
# echo "QT_DEBUG_PLUGINS=1" >> $GITHUB_ENV
40+
41+
- name: Set up Python environment
42+
uses: actions/setup-python@v2
43+
with:
44+
python-version: 3.9
45+
46+
- name: Upgrade PIP
47+
run: python -m pip install --upgrade pip
48+
49+
- name: Declare env variables on push only
50+
if: github.event_name == 'push'
51+
shell: bash
52+
run: echo "BRANCH_NAME=${GITHUB_REF#refs/*/}" >> $GITHUB_ENV
53+
54+
- name: Declare env variables on pull_request only
55+
if: github.event_name == 'pull_request'
56+
shell: bash
57+
run: echo "BRANCH_NAME=$GITHUB_HEAD_REF" >> $GITHUB_ENV
58+
59+
- name: Add extra info to pyproject.toml
60+
run: python utils.py --update
61+
62+
# https://docs.github.com/en/actions/reference/environment-variables
63+
- name: Declare env variables on push and pull_request
64+
shell: bash
65+
run: |
66+
echo "APP_NAME=$(python utils.py --get tool.poetry.name)" >> $GITHUB_ENV
67+
echo "SCRIPTS_PATH=$(python utils.py --get ci.project.subdirs.scripts)" >> $GITHUB_ENV
68+
echo "DISTRIBUTION_PATH=$(python utils.py --get ci.project.subdirs.distribution)" >> $GITHUB_ENV
69+
echo "DOWNLOAD_PATH=$(python utils.py --get ci.project.subdirs.download)" >> $GITHUB_ENV
70+
echo "QTIFW_PATH=$(python utils.py --get ci.qtifw.setup.installation_path.${{ runner.os }})" >> $GITHUB_ENV
71+
echo "PYTHON_PACKAGES_PATH=$(python utils.py --get ci.cache.python_packages_path)" >> $GITHUB_ENV
72+
echo "GIT_INSTALL_URL=git+ssh://[email protected]/$GITHUB_REPOSITORY@${{ env.BRANCH_NAME }}" >> $GITHUB_ENV
73+
74+
- name: Cache dependencies
75+
if: False # disable caching
76+
uses: actions/cache@v2
77+
id: cache
78+
with:
79+
path: |
80+
${{ env.DOWNLOAD_PATH }}
81+
${{ env.QTIFW_PATH }}
82+
${{ env.PYTHON_PACKAGES_PATH }}
83+
key: ${{ matrix.os }}-${{ hashFiles('pyproject.toml') }}
84+
85+
- name: Set up Python dependences
86+
#if: steps.cache.outputs.cache-hit != 'true'
87+
run: pip install ${{ env.GIT_INSTALL_URL }}
88+
89+
#- name: Relink CrysFML from default Python dylib
90+
# run: python ${{ env.SCRIPTS_PATH }}/RelinkCrysfml.py
91+
92+
- name: Create freezed python app bundle
93+
run: python ${{ env.SCRIPTS_PATH }}/FreezeApp.py
94+
95+
- name: Create offline and online app installers from freezed app bundle
96+
run: python ${{ env.SCRIPTS_PATH }}/MakeInstaller.py ${{ secrets.BINARY_SIGN_WIN }} ${{ secrets.CERT_ZIP_PASS }}
97+
98+
- name: Sign the installer
99+
run: python ${{ env.SCRIPTS_PATH }}/Signatures.py ${{ secrets.BINARY_SIGN_WIN }} ${{ secrets.CERT_ZIP_PASS }}
100+
101+
- name: Set up screen recording dependencies (macOS)
102+
if: runner.os == 'macOS'
103+
run: |
104+
"/Library/Application Support/VMware Tools/vmware-resolutionSet" 1920 1080
105+
system_profiler SPDisplaysDataType | grep Resolution
106+
107+
- name: Set up screen recording dependencies (Linux)
108+
if: runner.os == 'Linux'
109+
run: |
110+
sudo apt-get install libxkbcommon-x11-0
111+
Xvfb :0 -screen 0 1920x1080x24 -ac &
112+
echo "DISPLAY=:0" >> $GITHUB_ENV
113+
114+
- name: Set up screen recording dependencies (Windows)
115+
if: runner.os == 'Windows'
116+
run: |
117+
Set-DisplayResolution -Width 1920 -Height 1080 -Force
118+
Get-DisplayResolution
119+
120+
- name: Make dir for .desktop file (Linux)
121+
if: runner.os == 'Linux'
122+
run: mkdir -p ~/.local/share/applications/
123+
124+
- name: Install app
125+
run: python ${{ env.SCRIPTS_PATH }}/InstallApp.py
126+
127+
- name: Run app in testmode, record screen and quit
128+
# if: runner.os != 'Windows'
129+
run: python ${{ env.SCRIPTS_PATH }}/RunApp.py --testmode
130+
131+
- name: Rename test videos
132+
run: python ${{ env.SCRIPTS_PATH }}/CreateTestVideos.py ${{ env.BRANCH_NAME }}
133+
134+
- name: Create zip archive of offline app installer
135+
run: python ${{ env.SCRIPTS_PATH }}/ZipArtifacts.py ${{ env.BRANCH_NAME }}
136+
137+
- name: Upload zipped offline app installer to GitHub releases
138+
if: github.event_name == 'push'
139+
uses: ncipollo/release-action@v1
140+
with:
141+
draft: true
142+
prerelease: true
143+
allowUpdates: true
144+
replacesArtifacts: true
145+
token: ${{ secrets.GITHUB_TOKEN }}
146+
artifacts: "${{ env.DISTRIBUTION_PATH }}/${{ env.APP_NAME }}_*.zip,${{ env.DISTRIBUTION_PATH }}/tutorial_*.mp4"
147+
tag: ${{ env.BRANCH_NAME }}
148+
commit: ${{ env.BRANCH_NAME }}
149+
bodyFile: "RELEASE.md"
150+
151+
#- name: Upload online app installer to repository via FTP
152+
# if: github.event_name == 'push'
153+
# run: python ${{ env.SCRIPTS_PATH }}/UploadToFtp.py ${{ env.BRANCH_NAME }} ${{ secrets.APP_REPO_FTP_PASSWORD }}

.gitignore

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,6 @@ build
4141
# Misc
4242
..*
4343
*.log
44-
*.zip
4544
temp.cif
4645
temp.prm
4746
settings.ini*

.project.qmlproject

Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
import QmlProject 1.1
2+
3+
Project {
4+
mainFile: "easyReflectometryApp/Gui/main.qml"
5+
6+
// List of module and plugin directories passed to QML runtime
7+
importPaths: [
8+
"easyReflectometryApp",
9+
"../easyAppGui",
10+
]
11+
12+
// Include .qml files from specified directory and its subdirectories
13+
QmlFiles {
14+
directory: "easyReflectometryApp"
15+
}
16+
QmlFiles {
17+
directory: "../easyAppGui"
18+
}
19+
20+
// Include .js files from specified directory and its subdirectories
21+
JavaScriptFiles {
22+
directory: "easyReflectometryApp"
23+
}
24+
JavaScriptFiles {
25+
directory: "../easyAppGui"
26+
}
27+
28+
// Include Module Definition Files (qmldir), as well as .ts and .qrc
29+
// from specified directory and its subdirectories
30+
Files {
31+
filter: "qmldir;*.ts;*.qrc"
32+
directory: "easyReflectometryApp"
33+
recursive: true
34+
}
35+
Files {
36+
filter: "qmldir;*.ts;*.qrc"
37+
directory: "../easyAppGui"
38+
recursive: true
39+
}
40+
}

Certificates/Codesigning.zip

6.68 KB
Binary file not shown.

DEPENDENCIES.md

Lines changed: 2 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -4,14 +4,12 @@ The following Open Source projects are used in easyReflectometry (_if there are
44

55
## Computational libraries
66

7-
* [CrysPy](https://github.com/ikibalin/cryspy): [MIT License](https://raw.githubusercontent.com/ikibalin/cryspy/master/LICENSE)
8-
* [CrysFML](https://code.ill.fr/scientific-software/crysfml): [GNU Lesser General Public License (LGPL)](https://raw.githubusercontent.com/easyScience/libsDarwin/main/libsDarwin/CFML_api/LICENSE)
9-
* [GSAS-II](https://subversion.xray.aps.anl.gov/trac/pyGSAS): [License](https://raw.githubusercontent.com/easyScience/libsDarwin/main/libsDarwin/GSASII/license2013.txt)
7+
* [refnx](https://refnx.readthedocs.io/en/latest/): [BSD-3](https://github.com/refnx/refnx/blob/master/LICENSE)
8+
* [bornagain](https://www.bornagainproject.org): [GNU General Public License (GPL)](http://www.gnu.org/licenses/gpl-3.0.html)
109

1110
## Visualization libraries
1211

1312
* [BokehJS](https://docs.bokeh.org/en/2.2.3/docs/user_guide/bokehjs.html): [License](https://raw.githubusercontent.com/bokeh/bokeh/branch-2.2/bokehjs/LICENSE)
14-
* [ChemDoodle Web Components](https://web.chemdoodle.com/): [GNU General Public License (GPL)](http://www.gnu.org/licenses/gpl-3.0.html)
1513

1614
## Fonts
1715

@@ -27,7 +25,3 @@ The following Open Source projects are used in easyReflectometry (_if there are
2725

2826
Module information can be found at <https://app.fossa.com/attribution/ef7a4b12-0ea0-4c0e-a77a-791b5f307327>
2927

30-
31-
## Notes
32-
33-
* GSAS-II: This product includes software produced by UChicago Argonne, LLC under Contract No. DE-AC02-06CH11357 with the Department of Energy.

0 commit comments

Comments
 (0)