Skip to content

Commit

Permalink
update workflow actions
Browse files Browse the repository at this point in the history
  • Loading branch information
alemuntoni committed Nov 3, 2022
1 parent ac473a3 commit baf6eee
Show file tree
Hide file tree
Showing 6 changed files with 58 additions and 75 deletions.
56 changes: 20 additions & 36 deletions .github/workflows/CreateRelease.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ jobs:
name: Update RELIGHT_VERSION
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v3
with:
submodules: true
- name: Update ReLight version
Expand All @@ -38,16 +38,10 @@ jobs:
with:
ref: master
submodules: true
- name: Cache Qt
id: cache-qt
uses: actions/cache@v1
with:
path: ../Qt
key: ${{ runner.os }}-QtCache-${{ env.QT_VERSION }}
- name: Install Qt
uses: jurplel/install-qt-action@v2
uses: jurplel/install-qt-action@v3
with:
cached: ${{ steps.cache-qt.outputs.cache-hit }}
cached: true
version: ${{ env.QT_VERSION }}
- name: Install dependencies
run: |
Expand All @@ -59,12 +53,12 @@ jobs:
run: |
bash build_scripts/${{ runner.os }}/2_deploy_and_appimage.sh
- name: Upload Relight Portable
uses: actions/upload-artifact@v2
uses: actions/upload-artifact@v3
with:
name: relight_linux_portable
path: install/
- name: Upload Relight AppImage
uses: actions/upload-artifact@v2
uses: actions/upload-artifact@v3
with:
name: relight_linux_appimage
path: ReLight*.AppImage
Expand All @@ -75,27 +69,21 @@ jobs:
runs-on: macos-latest

steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v3
with:
ref: master
submodules: true
- name: Cache Qt
id: cache-qt
uses: actions/cache@v1
with:
path: ../Qt
key: ${{ runner.os }}-QtCache-${{ env.QT_VERSION }}
- name: Install Qt
uses: jurplel/install-qt-action@v2
with:
cached: ${{ steps.cache-qt.outputs.cache-hit }}
cache: true
version: ${{ env.QT_VERSION }}
- name: Install dependencies
run: |
bash build_scripts/${{ runner.os }}/0_setup_env.sh
- name: Configure and Build
run: |
bash build_scripts/${{ runner.os }}/1_build.sh
bash build_scripts/${{ runner.os }}/1_build.sh --use_brew_llvm
- name: Deploy
run: |
bash build_scripts/${{ runner.os }}/2_deploy.sh
Expand All @@ -121,12 +109,12 @@ jobs:
run: |
bash build_scripts/${{ runner.os }}/3_dmg.sh
- name: Upload Relight Portable
uses: actions/upload-artifact@v2
uses: actions/upload-artifact@v3
with:
name: relight_macos_portable
path: install/ReLight*.app
- name: Upload Relight DMG
uses: actions/upload-artifact@v2
uses: actions/upload-artifact@v3
with:
name: relight_macos_dmg
path: install/ReLight*.dmg
Expand All @@ -137,31 +125,27 @@ jobs:
runs-on: windows-latest

steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v3
with:
ref: master
submodules: true
- name: Setup MSVC
uses: ilammy/msvc-dev-cmd@v1
- name: Cache Qt
id: cache-qt
uses: actions/cache@v1
with:
path: ../Qt
key: ${{ runner.os }}-QtCache-${{ env.QT_VERSION }}
- name: Install Qt
uses: jurplel/install-qt-action@v2
uses: jurplel/install-qt-action@v3
with:
cached: ${{ steps.cache-qt.outputs.cache-hit }}
cached: true
version: ${{ env.QT_VERSION }}
- name: Setup env variables
shell: bash
run: |
echo "VCINSTALLDIR=C:\Program Files (x86)\Microsoft Visual Studio\2022\Enterprise\VC" >> $GITHUB_ENV
- name: Install wget
- name: Install dependencies
shell: bash
run: |
$env:PATH = "${{ env.PATH }};C:\msys64\mingw64\bin;C:\msys64\usr\bin"
pacman.exe -S --noconfirm --noprogressbar wget unzip
choco install ccache
choco install ninja
choco install wget
- name: Set Certificate
run: |
New-Item -ItemType directory -Path certificate
Expand All @@ -175,9 +159,9 @@ jobs:
run: |
.\build_scripts\Windows\resources\windows_sign_dlls.ps1 -pssw '${{ secrets.WIN_CERTIFICATE_PSSW }}' -path 'install\'
- name: Deploy
shell: C:\shells\msys2bash.cmd {0}
shell: bash
run: |
bash build_scripts/${{ runner.os }}/2_deploy.sh -qt=${{ env.Qt5_DIR }}
bash build_scripts/${{ runner.os }}/2_deploy.sh
- name: Upload Relight Portable
uses: actions/upload-artifact@v2
with:
Expand Down
16 changes: 5 additions & 11 deletions .github/workflows/Linux.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,19 +12,13 @@ jobs:
runs-on: ubuntu-18.04 #in order to deploy, need to use oldest supported version

steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v3
with:
submodules: true
- name: Cache Qt
id: cache-qt
uses: actions/cache@v1
with:
path: ../Qt
key: ${{ runner.os }}-QtCache-${{ env.QT_VERSION }}
- name: Install Qt
uses: jurplel/install-qt-action@v2
uses: jurplel/install-qt-action@v3
with:
cached: ${{ steps.cache-qt.outputs.cache-hit }}
cache: true
version: ${{ env.QT_VERSION }}
- name: Install dependencies
run: |
Expand All @@ -36,12 +30,12 @@ jobs:
run: |
bash build_scripts/${{ runner.os }}/2_deploy_and_appimage.sh
- name: Upload Relight Portable
uses: actions/upload-artifact@v2
uses: actions/upload-artifact@v3
with:
name: relight_linux_portable
path: install/
- name: Upload Relight AppImage
uses: actions/upload-artifact@v2
uses: actions/upload-artifact@v3
with:
name: relight_linux_appimage
path: ReLight*.AppImage
18 changes: 6 additions & 12 deletions .github/workflows/MacOS.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,39 +12,33 @@ jobs:
runs-on: macos-latest

steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v3
with:
submodules: true
- name: Cache Qt
id: cache-qt
uses: actions/cache@v1
with:
path: ../Qt
key: ${{ runner.os }}-QtCache-${{ env.QT_VERSION }}
- name: Install Qt
uses: jurplel/install-qt-action@v2
uses: jurplel/install-qt-action@v3
with:
cached: ${{ steps.cache-qt.outputs.cache-hit }}
cache: true
version: ${{ env.QT_VERSION }}
- name: Install dependencies
run: |
bash build_scripts/${{ runner.os }}/0_setup_env.sh
- name: Configure and Build
run: |
bash build_scripts/${{ runner.os }}/1_build.sh
bash build_scripts/${{ runner.os }}/1_build.sh --use_brew_llvm
- name: Deploy
run: |
bash build_scripts/${{ runner.os }}/2_deploy.sh
- name: DMG
run: |
bash build_scripts/${{ runner.os }}/3_dmg.sh
- name: Upload Relight Portable
uses: actions/upload-artifact@v2
uses: actions/upload-artifact@v3
with:
name: relight_macos_portable
path: install/ReLight*.app
- name: Upload Relight DMG
uses: actions/upload-artifact@v2
uses: actions/upload-artifact@v3
with:
name: relight_macos_dmg
path: install/ReLight*.dmg
26 changes: 11 additions & 15 deletions .github/workflows/Windows.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,40 +12,36 @@ jobs:
runs-on: windows-latest

steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v3
with:
submodules: true
- name: Setup MSVC
uses: ilammy/msvc-dev-cmd@v1
- name: Cache Qt
id: cache-qt
uses: actions/cache@v1
with:
path: ../Qt
key: ${{ runner.os }}-QtCache-${{ env.QT_VERSION }}
- name: Install Qt
uses: jurplel/install-qt-action@v2
uses: jurplel/install-qt-action@v3
with:
cached: ${{ steps.cache-qt.outputs.cache-hit }}
cache: true
version: ${{ env.QT_VERSION }}
- name: Setup env variables
shell: bash
run: |
echo "VCINSTALLDIR=C:\Program Files (x86)\Microsoft Visual Studio\2022\Enterprise\VC" >> $GITHUB_ENV
- name: Install wget
- name: Install dependencies
shell: bash
run: |
$env:PATH = "${{ env.PATH }};C:\msys64\mingw64\bin;C:\msys64\usr\bin"
pacman.exe -S --noconfirm --noprogressbar wget unzip
choco install ccache
choco install ninja
choco install wget
- name: Configure and Build
shell: bash
run: |
bash build_scripts/${{ runner.os }}/1_build.sh
- name: Deploy
shell: C:\shells\msys2bash.cmd {0}
shell: bash
run: |
bash build_scripts/${{ runner.os }}/2_deploy.sh -qt=${{ env.Qt5_DIR }}
bash build_scripts/${{ runner.os }}/2_deploy.sh
- name: Upload Relight Portable
uses: actions/upload-artifact@v2
uses: actions/upload-artifact@v3
with:
name: relight_windows_portable
path: install
2 changes: 1 addition & 1 deletion build_scripts/macOS/0_setup_env.sh
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ esac
done


brew install libomp eigen libjpeg
brew install llvm libomp eigen libjpeg
npm install -g appdmg

if [ "$INSTALL_QT" = true ] ; then
Expand Down
15 changes: 15 additions & 0 deletions build_scripts/macOS/1_build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ BUILD_PATH=$SOURCE_PATH/build
INSTALL_PATH=$SOURCE_PATH/install
CORES="-j4"
QT_DIR=""
USE_BREW_LLVM=false

#check parameters
for i in "$@"
Expand All @@ -39,6 +40,10 @@ case $i in
QT_DIR=${i#*=}
shift # past argument=value
;;
--use_brew_llvm)
USE_BREW_LLVM=true
shift # past argument=value
;;
*)
# unknown option
;;
Expand All @@ -63,6 +68,16 @@ then
export Qt5_DIR=$QT_DIR
fi

if [ "$USE_BREW_LLVM" = true ] ; then
export PATH="$(brew --prefix llvm)/bin:$PATH";
export CC=/usr/local/opt/llvm/bin/clang
export CXX=/usr/local/opt/llvm/bin/clang++
export COMPILER=${CXX}
export CFLAGS="-I /usr/local/include -I/usr/local/opt/llvm/include"
export CXXFLAGS="-I /usr/local/include -I/usr/local/opt/llvm/include"
export LDFLAGS="-L /usr/local/lib -L/usr/local/opt/llvm/lib"
fi

cmake -DCMAKE_BUILD_TYPE=MinSizeRel -DCMAKE_INSTALL_PREFIX=$INSTALL_PATH $SOURCE_PATH
make $CORES
make install

0 comments on commit baf6eee

Please sign in to comment.