Skip to content

Commit

Permalink
#1648 building dependencies with vcpkg (skip ci)
Browse files Browse the repository at this point in the history
  • Loading branch information
CAMOBAP committed Nov 13, 2021
1 parent f900506 commit faca093
Showing 1 changed file with 18 additions and 26 deletions.
44 changes: 18 additions & 26 deletions .github/workflows/ubuntu.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,11 +22,14 @@ env:
BUILD_MODE: normal
GPG_VERSION: stable
USE_STATIC_DEPENDENCIES: yes
VCPKG_ROOT: '/usr/local/share/vcpkg'

jobs:
tests:
name: ${{ matrix.os }} [CC ${{ matrix.env.CC }}; GnuPG stable]
runs-on: ${{ matrix.os }}
# if: "!contains(github.event.head_commit.message, 'skip ci')"
timeout-minutes: 50
strategy:
fail-fast: false
matrix:
Expand All @@ -36,37 +39,26 @@ jobs:
CXX: g++
- CC: clang
CXX: clang++
if: "!contains(github.event.head_commit.message, 'skip ci')"
env: ${{ matrix.env }}
timeout-minutes: 50
triplet: [x64-linux]
steps:
- uses: actions/checkout@v2
with:
fetch-depth: 1
- name: Setup environment
run: |
. ci/gha/setup-env.inc.sh
ci/install_noncacheable_dependencies.sh
- name: Cache
id: cache
uses: actions/cache@v2

- uses: actions/cache@v2
with:
path: ${{ env.CACHE_DIR }}
key: ${{ github.workflow }}-${{ runner.os }}-${{ env.BUILD_MODE }}-${{ matrix.env.CC }}-gpg-${{ env.GPG_VERSION }}-${{ hashFiles('ci/**') }}-${{ hashFiles('.github/workflows/**') }}
- name: Build cache
if: steps.cache.outputs.cache-hit != 'true'
run: |
set -x
ci/install_cacheable_dependencies.sh
- name: tests
run: |
set -x
ci/run.sh
- name: Package
run: |
set -x
cd ${LOCAL_BUILDS}/rnp-build
cpack -G DEB -D CPACK_DEBIAN_PACKAGE_SHLIBDEPS_PRIVATE_DIRS="${BOTAN_INSTALL}/lib;${JSONC_INSTALL}/lib;${GPG_INSTALL}/lib"
path: ${{ env.VCPKG_ROOT }}
key: vcpkg-ubuntu-${{ hashFiles('vcpkg.txt') }}

- run: vcpkg install --triplet ${{ matrix.triplet }} $(cat vcpkg.txt)

- run: cmake -B ./build --config "Release" -DCMAKE_TOOLCHAIN_FILE=${{ env.VCPKG_ROOT }}/scripts/buildsystems/vcpkg.cmake .

- run: cmake --build ./build --config "Release" -j 2

- run: cmake --install ./build --config "Release" -j 2

- run: cpack -B ./build -G DEB
cmake-offline-googletest-src:
env:
GTEST_SOURCES: /usr/src/googletest
Expand Down

0 comments on commit faca093

Please sign in to comment.