GithubHelp home page GithubHelp logo

codehz / run-vcpkg Goto Github PK

View Code? Open in Web Editor NEW

This project forked from lukka/run-vcpkg

0.0 1.0 0.0 139 KB

GitHub Action to run vcpkg to build C++ dependencies for your C++ based applications. Available as Azure DevOps tasks also: https://marketplace.visualstudio.com/items?itemName=lucappa.cmake-ninja-vcpkg-tasks

License: MIT License

TypeScript 40.42% JavaScript 59.58%

run-vcpkg's Introduction

Action Status

The run-vcpkg action for using vcpkg on GitHub

Build C++ software with the multi-platform run-vcpkg action by running vcpkg on GitHub workflows. Samples provided use GitHub hosted runners and Caching.

A good companion is the run-cmake action.

User Manual

Developer Manual

Quickstart

It is highly recommended to use vcpkg as a submodule. Here below the sample where vcpkg is a Git submodule:

  # Sample when vcpkg is a submodule of your repository (highly recommended!)

    # Cache/Restore the vcpkg's build artifacts.
    - name: Cache vcpkg's artifacts
      uses: actions/cache@v1
      with:
        path: ${{ github.workspace }}/vcpkg/
        # The key will be different each time a different version of vcpkg is used, or different ports are installed.
        key: ${{ hashFiles( env.vcpkgResponseFile ) }}-${{ hashFiles('.git/modules/vcpkg/HEAD') }}-${{ runner.os }}

    - name: Run vcpkg
      uses: lukka/run-vcpkg@v0
      with:
       # Response file stored in source control, it provides the list of ports and triplet(s).
        vcpkgArguments: '@${{ env.vcpkgResponseFile }}'
       # Location of the vcpkg as submodule of the repository.
        vcpkgDirectory: '${{ github.workspace }}/vcpkg'

    - name: 'Run CMake with Ninja'
      uses: lukka/run-cmake@v0
      with:
        cmakeListsOrSettingsJson: CMakeListsTxtAdvanced
        cmakeListsTxtPath: '${{ github.workspace }}/cmakesettings.json/CMakeLists.txt'
        useVcpkgToolchainFile: true
        buildDirectory: '${{ runner.workspace }}/b//unixmakefiles'
        cmakeAppendedArgs: '-G "Ninja" '
        # Or build multiple configurations out of a CMakeSettings.json file created with Visual Studio.
        # cmakeListsOrSettingsJson: CMakeSettingsJson
        # cmakeSettingsJsonPath: '${{ github.workspace }}/cmakesettings.json/CMakeSettings.json'
        # configurationRegexFilter: '${{ matrix.configuration }}'

The run-vcpkg action

This action behaves the same way as it does the run-vcpkg task for Azure DevOps.

The documentation of the 'run-vcpkg" action is identical to the 'run-vcpkg' task's one for Azure DevOps.

Action reference: all input/output parameters

action.yml

Samples

View the workflows based on the run-cmake and run-vcpkg actions.

CMakeLists.txt samples
Linux/macOS/Windows, hosted runner, basic Actions Status
Linux/macOS/Windows, hosted runner, advanced Actions Status
Linux/macOS/Windows, hosted runner, with cache and vcpkg as submodule Actions Status
CMakeSettings.json samples
Linux/macOS/Windows, hosted runner, with cache and vcpkg as submodule Actions Status

Real world project samples

project: CppOpenGLWebAssemblyCMake
WASM, Linux, macOS Actions Status

Developers information

Prerequisites

gulp 4 globally installed.

Build and lint

Build with tsc running:

npm run build

Launch lint by:

npm run lint

Packaging

To build, lint validate and package the extension for release purpose, run:

npm run pack

Testing

To build, pack and test:

npm run test

To run test directly:

jest

Smoke tests are implemented in this repository, which run the action on all platforms.

Rigorous tests are executed in the builds of CppBuildTasks repository that shares the same engine in the run-cmake-vcpkg-action-libs submodule.

It would be desirable to have extensive tests implemented in this repository as well.

Validation tests on various scenarios are run using the workflows of the Samples.

Contributing

The software is provided as is, there is no warranty of any kind. All users are encouraged to improve the source code with fixes and new features.

License

All the content in this repository is licensed under the MIT License.

Copyright (c) 2019-2020 Luca Cappa

run-vcpkg's People

Contributors

lukka avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.