[cmake/FindLibBSD.cmake] Rewrite to use PkgConfig
cmake module and …
#214
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
name: CI for Linux, Windows, macOS | |
on: | |
push: | |
branches: | |
- master | |
jobs: | |
build: | |
runs-on: ${{ matrix.os }} | |
strategy: | |
fail-fast: false | |
matrix: | |
os: [ubuntu-latest, windows-latest, macos-latest] | |
name: ${{ matrix.os }} | |
steps: | |
- uses: actions/checkout@v2 | |
- name: mkdir | |
run: mkdir build | |
- name: Install dependencies for macOS | |
run: brew install pkg-config libarchive | |
if: matrix.os == 'macos-latest' | |
- name: Install dependencies for Ubuntu | |
run: sudo apt-get install -y libcurl4-openssl-dev libarchive-dev | |
if: matrix.os == 'ubuntu-latest' | |
- name: Cache vcpkg | |
id: cache-vcpkg | |
uses: actions/cache@v2 | |
with: | |
path: vcpkg | |
key: ${{ runner.os }}-${{ hashFiles('**/vcpkg.json') }}-857bccdad005957391854448a15ba30e8c118503 | |
if: matrix.os == 'windows-latest' | |
- name: checkout vcpkg | |
uses: actions/checkout@v2 | |
with: | |
repository: "microsoft/vcpkg" | |
ref: 857bccdad005957391854448a15ba30e8c118503 | |
path: vcpkg | |
if: matrix.os == 'windows-latest' && steps.cache-vcpkg.outputs.cache-hit != 'true' | |
- name: Setup vcpkg (Windows) | |
run: ./vcpkg/bootstrap-vcpkg.bat | |
if: matrix.os == 'windows-latest' | |
- name: Install vcpkg ports (Windows) | |
run: ./vcpkg/vcpkg install --triplet "${{ runner.arch }}-${{ runner.os }}" "$(jq '.dependencies[]' vcpkg.json)" | |
if: matrix.os == 'windows-latest' && steps.cache-vcpkg.outputs.cache-hit != 'true' | |
- name: configure (with vcpkg on Windows) | |
working-directory: ./build | |
run: | | |
cmake -DCMAKE_BUILD_TYPE="Debug" -DCMAKE_TOOLCHAIN_FILE="%GITHUB_WORKSPACE%\vcpkg\scripts\buildsystems\vcpkg.cmake" .. | |
shell: cmd | |
if: matrix.os == 'windows-latest' | |
- name: configure (Ubuntu, macOS) | |
working-directory: ./build | |
run: cmake -DCMAKE_BUILD_TYPE="Debug" .. | |
if: matrix.os != 'windows-latest' | |
- name: build | |
working-directory: ./build | |
run: cmake --build . | |
- name: test | |
working-directory: ./build | |
run: ctest --output-on-failure -C Debug . | |
- name: release (Ubuntu) | |
working-directory: ./build | |
run: | | |
echo "${{ secrets.GITHUB_TOKEN }}" > .token | |
gh auth login --with-token < .token | |
rm .token | |
gh release delete -y amalgamation || true | |
gh release create amalgamation --target master "src/acquire.h" | |
if: matrix.os == 'ubuntu-latest' |