Skip to content
This repository has been archived by the owner on Aug 17, 2021. It is now read-only.

Commit

Permalink
cmake: CI test - 8
Browse files Browse the repository at this point in the history
  • Loading branch information
Qv2ray-dev authored and Qv2ray-dev committed Mar 24, 2020
1 parent 02d73b6 commit 3833a5f
Showing 1 changed file with 28 additions and 26 deletions.
54 changes: 28 additions & 26 deletions .github/workflows/build-simpleplugin.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,11 @@ jobs:
- platform: windows-latest
arch: x86
qtarch: win32_msvc2015
cmakearch: Win32
- platform: windows-latest
arch: x64
qtarch: win64_msvc2015_64
cmakearch: x64
exclude:
- platform: ubuntu-16.04
arch: x86
Expand Down Expand Up @@ -67,15 +69,6 @@ jobs:
mirror: 'http://mirrors.ocf.berkeley.edu/qt/'
cached: ${{ steps.cache-qt.outputs.cache-hit }}
# ========================================================================================================= Generate MakeFile and Build
- name: macOS - ${{ matrix.qt_version }} - Generate Dependencies and Build
shell: bash
if: matrix.platform == 'macos-latest'
run: |
mkdir build
cd build
cmake .. -DCMAKE_BUILD_TYPE=Release
cmake --build . --parallel $(sysctl -n hw.logicalcpu)
# --------------------------------------------------------
- name: Windows - ${{ matrix.qt_version }} - Generate Dependencies and Build
shell: bash
if: matrix.platform == 'windows-latest'
Expand All @@ -85,8 +78,17 @@ jobs:
run: |
mkdir build
cd build
cmake .. -DCMAKE_BUILD_TYPE=Release
cmake .. -DCMAKE_BUILD_TYPE=Release -A ${{ matrix.cmakearch }}
cmake --build . --parallel $(nproc) --config Release
# --------------------------------------------------------
- name: macOS - ${{ matrix.qt_version }} - Generate Dependencies and Build
shell: bash
if: matrix.platform == 'macos-latest'
run: |
mkdir build
cd build
cmake .. -DCMAKE_BUILD_TYPE=Release
cmake --build . --parallel $(sysctl -n hw.logicalcpu)
# --------------------------------------------------------
- name: Linux - ${{ matrix.qt_version }} - Generate Dependencies and Build
if: matrix.platform == 'ubuntu-16.04'
Expand All @@ -97,19 +99,19 @@ jobs:
cmake .. -DCMAKE_BUILD_TYPE=Release
cmake --build . --parallel $(nproc)
# ========================================================================================================= Deployments
- name: Linux - ${{ matrix.qt_version }} - Uploading artifact
if: matrix.platform == 'ubuntu-16.04'
- name: Win-${{ matrix.arch }} - ${{ matrix.qt_version }} - Uploading artifact
if: matrix.platform == 'windows-latest'
uses: actions/upload-artifact@master
with:
name: ${{ steps.get_name.outputs.NAME }}-${{ github.sha }}.linux-${{ matrix.arch }}.qt${{ matrix.qt_version }}.so
path: build/lib${{ steps.get_name.outputs.NAME }}.so
- name: Linux - ${{ matrix.qt_version }} - Upload binaries to release
name: ${{ steps.get_name.outputs.NAME }}-${{ github.sha }}.Windows-${{ matrix.arch }}.qt${{ matrix.qt_version }}.dll
path: build/Release/${{ steps.get_name.outputs.NAME }}.dll
- name: Win-${{ matrix.arch }} - ${{ matrix.qt_version }} - Upload binaries to release
uses: svenstaro/upload-release-action@v1-release
if: github.event_name == 'release' && matrix.platform == 'ubuntu-16.04'
if: github.event_name == 'release' && matrix.platform == 'windows-latest'
with:
repo_token: ${{ secrets.GITHUB_TOKEN }}
file: build/lib${{ steps.get_name.outputs.NAME }}.so
asset_name: ${{ steps.get_name.outputs.NAME }}.${{ steps.get_version.outputs.VERSION }}.linux-${{ matrix.arch }}.so
file: build/Release/${{ steps.get_name.outputs.NAME }}.dll
asset_name: ${{ steps.get_name.outputs.NAME }}.${{ steps.get_version.outputs.VERSION }}.Windows-${{ matrix.arch }}.dll
tag: ${{ github.ref }}
overwrite: true
# --------------------------------------------------------
Expand All @@ -129,18 +131,18 @@ jobs:
tag: ${{ github.ref }}
overwrite: true
# --------------------------------------------------------
- name: Win-${{ matrix.arch }} - ${{ matrix.qt_version }} - Uploading artifact
if: matrix.platform == 'windows-latest'
- name: Linux - ${{ matrix.qt_version }} - Uploading artifact
if: matrix.platform == 'ubuntu-16.04'
uses: actions/upload-artifact@master
with:
name: ${{ steps.get_name.outputs.NAME }}-${{ github.sha }}.Windows-${{ matrix.arch }}.qt${{ matrix.qt_version }}.dll
path: build/Release/${{ steps.get_name.outputs.NAME }}.dll
- name: Win-${{ matrix.arch }} - ${{ matrix.qt_version }} - Upload binaries to release
name: ${{ steps.get_name.outputs.NAME }}-${{ github.sha }}.linux-${{ matrix.arch }}.qt${{ matrix.qt_version }}.so
path: build/lib${{ steps.get_name.outputs.NAME }}.so
- name: Linux - ${{ matrix.qt_version }} - Upload binaries to release
uses: svenstaro/upload-release-action@v1-release
if: github.event_name == 'release' && matrix.platform == 'windows-latest'
if: github.event_name == 'release' && matrix.platform == 'ubuntu-16.04'
with:
repo_token: ${{ secrets.GITHUB_TOKEN }}
file: build/Release/${{ steps.get_name.outputs.NAME }}.dll
asset_name: ${{ steps.get_name.outputs.NAME }}.${{ steps.get_version.outputs.VERSION }}.Windows-${{ matrix.arch }}.dll
file: build/lib${{ steps.get_name.outputs.NAME }}.so
asset_name: ${{ steps.get_name.outputs.NAME }}.${{ steps.get_version.outputs.VERSION }}.linux-${{ matrix.arch }}.so
tag: ${{ github.ref }}
overwrite: true

0 comments on commit 3833a5f

Please sign in to comment.