Skip to content

Commit

Permalink
Update to version 16
Browse files Browse the repository at this point in the history
  • Loading branch information
awawa-dev committed May 5, 2021
1 parent d1d10c8 commit fcca7de
Show file tree
Hide file tree
Showing 130 changed files with 6,634 additions and 3,260 deletions.
37 changes: 30 additions & 7 deletions .ci/ci_build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -24,13 +24,36 @@ echo "Platform: ${PLATFORM}, build type: ${BUILD_TYPE}, CI_NAME: $CI_NAME, docke
# Build the package on osx or linux
if [[ "$CI_NAME" == 'osx' || "$CI_NAME" == 'darwin' ]]; then
echo "Start: osx or darwin"

mkdir build || exit 1
cd build
cmake -DPLATFORM=${PLATFORM} -DCMAKE_BUILD_TYPE=${BUILD_TYPE} -DCMAKE_INSTALL_PREFIX:PATH=/usr/local ../ || exit 2
make -j $(sysctl -n hw.ncpu) package || exit 3
exit 0;
exit 1 || { echo "---> Hyperhdr compilation failed! Abort"; exit 5; }
if [[ "$USE_CCACHE" == '1' ]]; then
echo "Using ccache"

# Init ccache
mkdir -p .ccache
cd .ccache
CCACHE_PATH=$PWD
cd ..
cachecommand="-DCMAKE_C_COMPILER_LAUNCHER=ccache"
export CCACHE_DIR=${CCACHE_PATH} && export CCACHE_COMPRESS=true && export CCACHE_COMPRESSLEVEL=6 && export CCACHE_MAXSIZE=400M
echo "CCache parameters: ${cachecommand}"
ls -a .ccache

mkdir build || exit 1
cd build
ccache -p
cmake ${cachecommand} -DPLATFORM=${PLATFORM} -DCMAKE_BUILD_TYPE=${BUILD_TYPE} -DCMAKE_INSTALL_PREFIX:PATH=/usr/local ../ || exit 2
make -j $(sysctl -n hw.ncpu) package || exit 3

exit 0;
exit 1 || { echo "---> HyperHDR compilation failed! Abort"; exit 5; }
else
echo "Not using ccache"
mkdir build || exit 1
cd build
cmake -DPLATFORM=${PLATFORM} -DCMAKE_BUILD_TYPE=${BUILD_TYPE} -DCMAKE_INSTALL_PREFIX:PATH=/usr/local ../ || exit 2
make -j $(sysctl -n hw.ncpu) package || exit 3
exit 0;
exit 1 || { echo "---> HyperHDR compilation failed! Abort"; exit 5; }
fi
elif [[ $CI_NAME == *"mingw64_nt"* || "$CI_NAME" == 'windows_nt' ]]; then
echo "Start: windows"

Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/cleanup.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,4 +12,4 @@ jobs:
uses: kolpav/purge-artifacts-action@v1
with:
token: ${{ secrets.GITHUB_TOKEN }}
expire-in: 14days # all artifacts at least 14 days old
expire-in: 28days # all artifacts at least 28 days old
63 changes: 61 additions & 2 deletions .github/workflows/push-master-copy.bak
Original file line number Diff line number Diff line change
Expand Up @@ -78,6 +78,65 @@ jobs:
name: ${{ matrix.dockerImage }}
path: deploy/Hyper*.deb

######################
####### macOS ########
######################

macOS:
name: macOS
runs-on: macos-latest
steps:
# Checkout
- uses: actions/checkout@v1
with:
submodules: true

# Generate cache id
- name: Prepare ccache timestamp
if: env.USE_CACHE == '1'
id: ccache_cache_timestamp
shell: cmake -P {0}
run: |
string(TIMESTAMP current_date "%Y-%m-%d-%H-%M-%S" UTC)
message("::set-output name=timestamp::${current_date}")

# Download cache
- name: ccache cache files
if: env.USE_CACHE == '1'
uses: actions/cache@v1.1.0
with:
path: .ccache
key: macOS-ccache-${{ steps.ccache_cache_timestamp.outputs.timestamp }}
restore-keys: macOS-ccache-

# Install deps
- name: Install deps
shell: bash
run: brew update && brew upgrade && brew install qt@5 xz ccache

# Build process
- name: Build packages
env:
PLATFORM: osx
USE_CCACHE: ${{ env.USE_CACHE }}
shell: bash
run: ./.ci/ci_build.sh

# Upload artifacts (only on tagged commit)
- name: Upload artifacts
if: startsWith(github.event.ref, 'refs/tags')
uses: actions/upload-artifact@v2
with:
path: build/Hyper*.dmg

# Upload artifacts from commit
- name: Upload artifacts from commit
if: (startsWith(github.event.ref, 'refs/tags') != true)
uses: actions/upload-artifact@v2
with:
name: macOS_x64
path: build/Hyper*.dmg

######################
###### Windows #######
######################
Expand All @@ -87,7 +146,7 @@ jobs:
runs-on: windows-latest
env:
VCINSTALLDIR: 'C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\VC'
QT_VERSION: 5.15.0
QT_VERSION: 5.15.2
steps:
- name: Checkout
uses: actions/checkout@v1
Expand Down Expand Up @@ -142,7 +201,7 @@ jobs:
publish:
name: Publish Releases
if: startsWith(github.event.ref, 'refs/tags')
needs: [Linux, windows]
needs: [Linux, windows, macOS]
runs-on: ubuntu-20.04
steps:
- name: Checkout
Expand Down
63 changes: 61 additions & 2 deletions .github/workflows/push-master.yml
Original file line number Diff line number Diff line change
Expand Up @@ -78,6 +78,65 @@ jobs:
name: ${{ matrix.dockerImage }}
path: deploy/Hyper*.deb

######################
####### macOS ########
######################

macOS:
name: macOS
runs-on: macos-latest
steps:
# Checkout
- uses: actions/checkout@v1
with:
submodules: true

# Generate cache id
- name: Prepare ccache timestamp
if: env.USE_CACHE == '1'
id: ccache_cache_timestamp
shell: cmake -P {0}
run: |
string(TIMESTAMP current_date "%Y-%m-%d-%H-%M-%S" UTC)
message("::set-output name=timestamp::${current_date}")
# Download cache
- name: ccache cache files
if: env.USE_CACHE == '1'
uses: actions/cache@v1.1.0
with:
path: .ccache
key: macOS-ccache-${{ steps.ccache_cache_timestamp.outputs.timestamp }}
restore-keys: macOS-ccache-

# Install deps
- name: Install deps
shell: bash
run: brew update && brew upgrade && brew install qt@5 xz ccache

# Build process
- name: Build packages
env:
PLATFORM: osx
USE_CCACHE: ${{ env.USE_CACHE }}
shell: bash
run: ./.ci/ci_build.sh

# Upload artifacts (only on tagged commit)
- name: Upload artifacts
if: startsWith(github.event.ref, 'refs/tags')
uses: actions/upload-artifact@v2
with:
path: build/Hyper*.dmg

# Upload artifacts from commit
- name: Upload artifacts from commit
if: (startsWith(github.event.ref, 'refs/tags') != true)
uses: actions/upload-artifact@v2
with:
name: macOS_x64
path: build/Hyper*.dmg

######################
###### Windows #######
######################
Expand All @@ -87,7 +146,7 @@ jobs:
runs-on: windows-latest
env:
VCINSTALLDIR: 'C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\VC'
QT_VERSION: 5.15.0
QT_VERSION: 5.15.2
steps:
- name: Checkout
uses: actions/checkout@v1
Expand Down Expand Up @@ -142,7 +201,7 @@ jobs:
publish:
name: Publish Releases
if: startsWith(github.event.ref, 'refs/tags')
needs: [Linux, windows]
needs: [Linux, windows, macOS]
runs-on: ubuntu-20.04
steps:
- name: Checkout
Expand Down
Loading

0 comments on commit fcca7de

Please sign in to comment.