Skip to content

Commit

Permalink
Update main.yml
Browse files Browse the repository at this point in the history
  • Loading branch information
kwagyeman authored Sep 8, 2023
1 parent 372f1e0 commit 8b7688a
Showing 1 changed file with 24 additions and 20 deletions.
44 changes: 24 additions & 20 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,11 +16,11 @@ jobs:
runs-on: ${{ matrix.map.os }}
strategy:
matrix:
map: [{os: windows-2019, host: windows, suffix: exe, make_args: ''},
{os: windows-2019, host: windows, suffix: exe, make_args: '--factory'},
{os: ubuntu-20.04, host: linux, suffix: run, make_args: ''},
{os: macos-11, host: mac, suffix: dmg, make_args: ''},
{os: ubuntu-20.04, host: linux-rpi, suffix: tar.gz, make_args: ''}]
map: [{os: windows-2019, host: windows, suffix: exe},
{os: windows-2019, host: windows-factory, suffix: exe},
{os: ubuntu-20.04, host: linux, suffix: run},
{os: macos-11, host: mac, suffix: dmg},
{os: ubuntu-20.04, host: linux-rpi, suffix: tar.gz}]
fail-fast: false
steps:
- name: '⏳ Checkout repository'
Expand All @@ -29,7 +29,7 @@ jobs:
submodules: recursive

- name: '❖ Install Windows Certificates (1/3)'
if: matrix.map.host == 'windows'
if: matrix.map.host == 'windows' || matrix.map.host == 'windows-factory'
env:
SM_CLIENT_CERT_FILE_B64: ${{ secrets.SM_CLIENT_CERT_FILE_B64 }}
run: |
Expand All @@ -41,11 +41,11 @@ jobs:
shell: bash

- name: '❖ Install Windows Certificates (2/3)'
if: matrix.map.host == 'windows'
if: matrix.map.host == 'windows' || matrix.map.host == 'windows-factory'
uses: digicert/[email protected]

- name: '❖ Install Windows Certificates (3/3)'
if: matrix.map.host == 'windows'
if: matrix.map.host == 'windows' || matrix.map.host == 'windows-factory'
env:
SM_API_KEY: ${{ secrets.SM_API_KEY }}
run: smksp_cert_sync
Expand Down Expand Up @@ -76,7 +76,7 @@ jobs:
xcrun notarytool store-credentials "AC_PASSWORD" --apple-id "$APPLE_ID" --team-id "$TEAM_ID" --password "$NOTARYTOOL_PASSWORD"
- name: '⬇ Install Qt on Windows'
if: matrix.map.host == 'windows'
if: matrix.map.host == 'windows' || matrix.map.host == 'windows-factory'
uses: jurplel/install-qt-action@v3
with:
aqtversion: '==3.1.*'
Expand Down Expand Up @@ -175,32 +175,36 @@ jobs:
SM_API_KEY: ${{ secrets.SM_API_KEY }}
SM_CLIENT_CERT_PASSWORD: ${{ secrets.SM_CLIENT_CERT_PASSWORD }}
SM_CODE_SIGNING_CERT_SHA1_HASH: ${{ secrets.SM_CODE_SIGNING_CERT_SHA1_HASH }}
MAKE_ARGS: ${{ matrix.map.make_args }}
run: python make.py $MAKE_ARGS
run: python make.py

- name: '🏗 Build IDE on Windows'
if: matrix.map.host == 'windows-factory'
env:
SM_HOST: ${{ secrets.SM_HOST }}
SM_API_KEY: ${{ secrets.SM_API_KEY }}
SM_CLIENT_CERT_PASSWORD: ${{ secrets.SM_CLIENT_CERT_PASSWORD }}
SM_CODE_SIGNING_CERT_SHA1_HASH: ${{ secrets.SM_CODE_SIGNING_CERT_SHA1_HASH }}
run: python make.py --factory

- name: '🏗 Build IDE on Linux'
if: matrix.map.host == 'linux'
env:
MAKE_ARGS: ${{ matrix.map.make_args }}
run: |
sudo apt-get install -y chrpath
python make.py $MAKE_ARGS
python make.py --no-build-installer $MAKE_ARGS
python make.py
python make.py --no-build-installer
version=$(ls build | grep -oP 'openmv-ide-linux-x86_64-\K[0-9]+\.[0-9]+\.[0-9]+(?=\.run)')
cd qt-creator/share/qtcreator
zip -r ../../../build/openmv-ide-resources-${version}.zip examples firmware html models
- name: '🏗 Build IDE on Mac'
if: matrix.map.host == 'mac'
env:
MAKE_ARGS: ${{ matrix.map.make_args }}
run: python make.py $MAKE_ARGS
run: python make.py

- name: '🏗 Build IDE on Linux for Raspberry Pi'
if: matrix.map.host == 'linux-rpi'
env:
MAKE_ARGS: ${{ matrix.map.make_args }}
run: python make.py --rpi ~/qt-raspi $MAKE_ARGS
run: python make.py --rpi ~/qt-raspi

- name: '⬆ Upload artifacts'
if: github.event_name != 'pull_request'
Expand All @@ -224,7 +228,7 @@ jobs:
if-no-files-found: error

- name: '❖ Remove Windows Certificates'
if: matrix.map.host == 'windows'
if: matrix.map.host == 'windows' || matrix.map.host == 'windows-factory'
run: rm $SM_CLIENT_CERT_FILE
shell: bash

Expand Down

0 comments on commit 8b7688a

Please sign in to comment.