|
7 | 7 | - "v*" |
8 | 8 |
|
9 | 9 | jobs: |
10 | | - compile-gui: |
11 | | - # Compile the GUI on Windows & Linux, and write the GUI binaries to actions/cache |
12 | | - name: Compile GUI |
13 | | - strategy: |
14 | | - matrix: |
15 | | - os: [ubuntu-latest, windows-latest] |
16 | | - runs-on: ${{ matrix.os }} |
17 | | - steps: |
18 | | - - name: Checkout code |
19 | | - uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v4 |
20 | | - with: |
21 | | - persist-credentials: false |
22 | | - |
23 | | - - name: Fetch cached compiled GUI |
24 | | - id: restore-compiled-gui |
25 | | - uses: actions/cache/restore@0400d5f644dc74513175e3cd8d07132dd4860809 # v4 |
26 | | - with: |
27 | | - # enableCrossOsArchive always needs to be set on cached items in Windows jobs |
28 | | - # see cache documentation: https://github.com/actions/cache#inputs |
29 | | - enableCrossOsArchive: true |
30 | | - path: gui/dist/cloudfuseGUI_${{ runner.os }} |
31 | | - key: ${{ runner.os }}-compiled-gui-${{ hashFiles('gui/*.ui', 'gui/*.py') }} |
32 | | - |
33 | | - - name: Install Python |
34 | | - if: ${{ ! steps.restore-compiled-gui.outputs.cache-hit }} |
35 | | - uses: actions/setup-python@a26af69be951a213d495a4c3e4e4022e16d87065 # v5 |
36 | | - with: |
37 | | - python-version: "3.12" |
38 | | - |
39 | | - - name: Install pip dependencies |
40 | | - if: ${{ ! steps.restore-compiled-gui.outputs.cache-hit }} |
41 | | - run: pip3 install -r gui/requirements.txt |
42 | | - shell: bash |
43 | | - |
44 | | - - name: Install libxcb-cursor0 |
45 | | - if: ${{ ! steps.restore-compiled-gui.outputs.cache-hit && matrix.os == 'ubuntu-latest' }} |
46 | | - run: |- |
47 | | - sudo apt-get update |
48 | | - sudo apt-get install libxcb-cursor0 -y |
49 | | -
|
50 | | - - name: Compile GUI |
51 | | - if: ${{ ! steps.restore-compiled-gui.outputs.cache-hit }} |
52 | | - shell: bash |
53 | | - env: |
54 | | - OS: ${{ runner.os }} |
55 | | - run: | |
56 | | - cd gui |
57 | | - ./create_gui.sh |
58 | | - mv dist/cloudfuseGUI dist/cloudfuseGUI_${OS} |
59 | | -
|
60 | | - - name: Cache compiled GUI |
61 | | - if: ${{ ! steps.restore-compiled-gui.outputs.cache-hit }} |
62 | | - uses: actions/cache/save@0400d5f644dc74513175e3cd8d07132dd4860809 # v4 |
63 | | - with: |
64 | | - enableCrossOsArchive: true |
65 | | - path: gui/dist/cloudfuseGUI_${{ runner.os }} |
66 | | - key: ${{ runner.os }}-compiled-gui-${{ hashFiles('gui/*.ui', 'gui/*.py') }} |
67 | | - |
68 | 10 | create-installer: |
69 | 11 | # Run Inno Setup to create the Windows app installer, then write it to actions/cache |
70 | 12 | name: Create Windows Installer |
|
0 commit comments