-
-
Notifications
You must be signed in to change notification settings - Fork 173
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix big in release. Fix CI for release.
- Loading branch information
Showing
5 changed files
with
202 additions
and
6 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -3,7 +3,6 @@ on: | |
push: | ||
branches: | ||
- master | ||
- release | ||
pull_request: | ||
|
||
jobs: | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,81 @@ | ||
name: NoVcpkg Build | ||
on: | ||
push: | ||
branches: | ||
- release | ||
pull_request: | ||
|
||
jobs: | ||
build_novcpkg: | ||
name: build-novcpkg-${{ matrix.os }}-gcc${{ matrix.gcc }} | ||
runs-on: ${{ matrix.os }} | ||
strategy: | ||
fail-fast: true | ||
matrix: | ||
os: [ubuntu-latest, macos-latest] | ||
gcc: [11, 12] | ||
exclude: | ||
- os: macos-latest | ||
gcc: 11 | ||
- os: macos-latest | ||
gcc: 12 | ||
env: | ||
# Indicates the CMake build directory where project files and binaries are being produced. | ||
CMAKE_BUILD_DIR: ${{ github.workspace }}/build | ||
|
||
steps: | ||
- name: Install Dependencies (Linux) | ||
run: | | ||
sudo apt-get update && \ | ||
sudo apt-get install --no-install-recommends \ | ||
libboost-dev \ | ||
libsodium-dev \ | ||
libncurses5-dev \ | ||
libprotobuf-dev \ | ||
protobuf-compiler \ | ||
libgflags-dev \ | ||
libutempter-dev \ | ||
build-essential \ | ||
ninja-build \ | ||
libcurl4-openssl-dev \ | ||
curl \ | ||
zip \ | ||
unzip \ | ||
tar \ | ||
cmake \ | ||
libutempter-dev \ | ||
libunwind-dev | ||
if: matrix.os == 'ubuntu-latest' | ||
- name: Install Dependencies (macOS) | ||
run: brew update && brew install ninja cmake pkg-config curl openssl protobuf libsodium | ||
if: matrix.os == 'macos-latest' | ||
|
||
- uses: actions/checkout@v2 | ||
with: | ||
submodules: false | ||
|
||
# Run CMake to generate Ninja project files. | ||
- name: Install dependencies and generate project files (mac) | ||
run: | | ||
OPENSSL_ROOT_DIR=`brew --prefix openssl` cmake -S "${{ github.workspace }}" -B "${{ env.CMAKE_BUILD_DIR }}" -GNinja -DCMAKE_BUILD_TYPE=RelWithDebInfo -DDISABLE_VCPKG=ON -DOPENSSL_ROOT_DIR=$OPENSSL_ROOT_DIR | ||
if: matrix.os == 'macos-latest' | ||
- name: Install dependencies and generate project files (linux) | ||
env: | ||
CC: gcc-${{ matrix.gcc }} | ||
CXX: g++-${{ matrix.gcc }} | ||
run: | | ||
cmake -S "${{ github.workspace }}" -B "${{ env.CMAKE_BUILD_DIR }}" -GNinja -DCMAKE_BUILD_TYPE=RelWithDebInfo -DDISABLE_VCPKG=ON -DOPENSSL_ROOT_DIR=$OPENSSL_ROOT_DIR | ||
if: matrix.os == 'ubuntu-latest' | ||
- name: Install dependencies and generate project files (windows) | ||
run: | | ||
cmake -S "${{ github.workspace }}" -B "${{ env.CMAKE_BUILD_DIR }}" -GNinja -DCMAKE_BUILD_TYPE=RelWithDebInfo -DDISABLE_VCPKG=ON -DOPENSSL_ROOT_DIR=$OPENSSL_ROOT_DIR | ||
if: matrix.os == 'windows-latest' | ||
# Build the whole project with Ninja (which is spawn by CMake). | ||
- name: Build | ||
run: | | ||
cmake --build "${{ env.CMAKE_BUILD_DIR }}" | ||
- uses: actions/upload-artifact@v2 | ||
with: | ||
name: et-client-${{matrix.os}} | ||
path: ${{ env.CMAKE_BUILD_DIR }}/et${{matrix.extension}} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -3,7 +3,6 @@ on: | |
push: | ||
branches: | ||
- master | ||
- release | ||
pull_request: | ||
|
||
jobs: | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,117 @@ | ||
name: Vcpkg Build | ||
on: | ||
push: | ||
branches: | ||
- release | ||
pull_request: | ||
|
||
jobs: | ||
build_vcpkg: | ||
name: build-vcpkg-${{ matrix.os }}-${{ matrix.gcc }} | ||
runs-on: ${{ matrix.os }} | ||
strategy: | ||
fail-fast: true | ||
matrix: | ||
os: [ubuntu-latest, macos-latest, windows-latest] | ||
gcc: [11, 12] | ||
include: | ||
- os: windows-latest | ||
extension: .exe | ||
exclude: | ||
- os: macos-latest | ||
gcc: 11 | ||
- os: macos-latest | ||
gcc: 12 | ||
- os: windows-latest | ||
gcc: 11 | ||
- os: windows-latest | ||
gcc: 12 | ||
env: | ||
# Indicates the CMake build directory where project files and binaries are being produced. | ||
CMAKE_BUILD_DIR: ${{ github.workspace }}/build | ||
# Indicates the location of the vcpkg as a Git submodule of the project repository. | ||
VCPKG_ROOT: ${{ github.workspace }}/external/vcpkg | ||
|
||
steps: | ||
- name: Install Dependencies (Linux) | ||
run: | | ||
sudo apt-get update && \ | ||
sudo apt-get install --no-install-recommends \ | ||
libboost-dev \ | ||
libsodium-dev \ | ||
libncurses5-dev \ | ||
libprotobuf-dev \ | ||
protobuf-compiler \ | ||
libgflags-dev \ | ||
libutempter-dev \ | ||
build-essential \ | ||
ninja-build \ | ||
libcurl4-openssl-dev \ | ||
curl \ | ||
zip \ | ||
unzip \ | ||
tar \ | ||
cmake \ | ||
libutempter-dev \ | ||
libunwind-dev | ||
if: matrix.os == 'ubuntu-latest' | ||
- name: Install Dependencies (Windows) | ||
run: choco install ninja | ||
if: matrix.os == 'windows-latest' | ||
- name: Install Dependencies (macOS) | ||
run: brew update && brew install ninja cmake | ||
if: matrix.os == 'macos-latest' | ||
|
||
- uses: actions/checkout@v2 | ||
with: | ||
submodules: false | ||
|
||
# Restore both vcpkg and its artifacts from the GitHub cache service. | ||
- name: Restore vcpkg and its artifacts. | ||
uses: actions/cache@v2 | ||
with: | ||
path: | | ||
${{ env.VCPKG_ROOT }} | ||
!${{ env.VCPKG_ROOT }}/buildtrees | ||
!${{ env.VCPKG_ROOT }}/packages | ||
!${{ env.VCPKG_ROOT }}/downloads | ||
# The key is composed in a way that it gets properly invalidated: this must happen whenever vcpkg's Git commit id changes, or the list of packages changes. In this case a cache miss must happen and a new entry with a new key with be pushed to GitHub the cache service. | ||
# The key includes: hash of the vcpkg.json file, the hash of the vcpkg Git commit id, and the used vcpkg's triplet. The vcpkg's commit id would suffice, but computing an hash out it does not harm. | ||
# Note: given a key, the cache content is immutable. If a cache entry has been created improperly, in order the recreate the right content the key must be changed as well, and it must be brand new (i.e. not existing already). | ||
key: | | ||
et-2-vcpkg-${{ hashFiles( 'vcpkg.json' ) }}-${{ hashFiles( '.git/modules/external/vcpkg/HEAD' )}}-${{ matrix.os }} | ||
- name: Show content of workspace after cache has been restored | ||
run: find $RUNNER_WORKSPACE | ||
shell: bash | ||
|
||
# On Windows runners, let's ensure to have the Developer Command Prompt environment setup correctly. As used here the Developer Command Prompt created is targeting x64 and using the default the Windows SDK. | ||
- uses: ilammy/msvc-dev-cmd@v1 | ||
# Run CMake to generate Ninja project files, using the vcpkg's toolchain file to resolve and install the dependencies as specified in vcpkg.json. | ||
- name: Install dependencies and generate project files (linux) | ||
env: | ||
CC: gcc-${{ matrix.gcc }} | ||
CXX: g++-${{ matrix.gcc }} | ||
run: | | ||
cmake -S "${{ github.workspace }}" -B "${{ env.CMAKE_BUILD_DIR }}" -GNinja -DCMAKE_BUILD_TYPE=RelWithDebInfo | ||
if: matrix.os == 'ubuntu-latest' | ||
- name: Install dependencies and generate project files (mac) | ||
env: | ||
CC: gcc-${{ matrix.gcc }} | ||
CXX: g++-${{ matrix.gcc }} | ||
run: | | ||
cmake -S "${{ github.workspace }}" -B "${{ env.CMAKE_BUILD_DIR }}" -GNinja -DCMAKE_BUILD_TYPE=RelWithDebInfo | ||
if: matrix.os == 'macos-latest' | ||
- name: Install dependencies and generate project files (windows) | ||
run: | | ||
cmake -S "${{ github.workspace }}" -B "${{ env.CMAKE_BUILD_DIR }}" -GNinja -DCMAKE_BUILD_TYPE=RelWithDebInfo | ||
if: matrix.os == 'windows-latest' | ||
# Build the whole project with Ninja (which is spawn by CMake). | ||
- name: Build | ||
run: | | ||
cmake --build "${{ env.CMAKE_BUILD_DIR }}" | ||
- uses: actions/upload-artifact@v2 | ||
with: | ||
name: et-client-${{matrix.os}} | ||
path: ${{ env.CMAKE_BUILD_DIR }}/et${{matrix.extension}} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters