-
Notifications
You must be signed in to change notification settings - Fork 125
Feature/gha workflow base #66
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from all commits
Commits
Show all changes
14 commits
Select commit
Hold shift + click to select a range
2ba3440
setting up infrastructure for external dependencies
vimanyu d52c334
basic workflow for windows
vimanyu 8f52ba9
fixed path to vcpkg toolchain file
vimanyu d599a0c
adding caching for dependencies handled by vcpkg
vimanyu 92ce584
cache hash key now uses submodule version of vcpkg
vimanyu 3bbb589
do not install vcpkg deps on cache hit
vimanyu 537c211
adding ccache and an all desktop workflow
vimanyu 3f7ad14
correct path for vcpkg toolchain
vimanyu 8723794
test if ccache cache actually worked
vimanyu 8928078
more accurate name for system install step on ubuntu
vimanyu e7ef3f2
more robust check for installation of ccache
vimanyu a1cc526
Merge branch 'dev' into feature/gha-workflow-base
vimanyu a6c53d9
Merge branch 'dev' into feature/gha-workflow-base
vimanyu 42815b7
Merge branch 'dev' into feature/gha-workflow-base
DellaBitta File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or 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,161 @@ | ||
| name: Desktop Builds | ||
|
|
||
| on: | ||
| push: | ||
| pull_request: | ||
|
|
||
| env: | ||
| CCACHE_DIR: ${{ github.workspace }}/ccache_dir | ||
|
|
||
| jobs: | ||
| build: | ||
| name: ${{ matrix.os }}-${{ matrix.build_type }}-${{ matrix.architecture }}-${{ matrix.python_version }}-${{ matrix.generator }} | ||
| runs-on: ${{ matrix.os }} | ||
| strategy: | ||
| fail-fast: false | ||
| matrix: | ||
| os: [windows-latest, ubuntu-latest, macos-latest] | ||
| build_type: ["Release"] | ||
| architecture: ["x64",] | ||
| python_version: [2.7] | ||
| generator: ["Visual Studio 16 2019", "Unix Makefiles", "Ninja"] | ||
| exclude: | ||
| - os: ubuntu-latest | ||
| generator: "Visual Studio 16 2019" | ||
| - os: macos-latest | ||
| generator: "Visual Studio 16 2019" | ||
| - os: windows-latest | ||
| generator: "Unix Makefiles" | ||
| - os: windows-latest | ||
| generator: "Ninja" | ||
|
|
||
| include: | ||
| - os: windows-latest | ||
| architecture: "x64" | ||
| vcpkg_triplet: "x64-windows-static" | ||
| msbuild_platform: "x64" | ||
| - os: ubuntu-latest | ||
| architecture: "x64" | ||
| vcpkg_triplet: "x64-linux" | ||
| - os: macos-latest | ||
| architecture: "x64" | ||
| vcpkg_triplet: "x64-osx" | ||
|
|
||
| steps: | ||
| - uses: actions/checkout@v2 | ||
| with: | ||
| submodules: true | ||
|
|
||
| - name: Set env variables for subsequent steps (all) | ||
| run: | | ||
| echo "::set-env name=VCPKG_RESPONSE_FILE::external/vcpkg_${{ matrix.vcpkg_triplet }}_response_file.txt" | ||
| echo "::set-env name=PIP_REQUIREMENTS_FILE::external/pip_requirements.txt" | ||
| echo "::set-env name=MATRIX_UNIQUE_NAME::${{ matrix.os }}-${{ matrix.build_type }}-${{ matrix.architecture }}-${{ matrix.python_version }}-${{ matrix.generator }}" | ||
|
|
||
| - name: Install Ninja (windows) | ||
| if: startsWith(matrix.generator, 'Ninja') && startsWith(matrix.os, 'windows') | ||
| run: | | ||
| choco install ninja | ||
|
|
||
| - name: Install Ninja (mac) | ||
| if: startsWith(matrix.generator, 'Ninja') && startsWith(matrix.os, 'macos') | ||
| run: | | ||
| brew install ninja | ||
|
|
||
| - name: Install Ninja (linux) | ||
| if: startsWith(matrix.generator, 'Ninja') && startsWith(matrix.os, 'ubuntu') | ||
| run: | | ||
| sudo apt install ninja-build | ||
|
|
||
| - name: Install system level applications (mac) | ||
| if: startsWith(matrix.os, 'macos') | ||
| id: macos-brew-install | ||
| run: | | ||
| brew install ccache | ||
| echo "::set-env name=CCACHE_INSTALLED::1" | ||
|
|
||
| - name: Install system level applications (linux) | ||
| if: startsWith(matrix.os, 'ubuntu') | ||
| id: ubuntu-apt-install | ||
| run: | | ||
| sudo apt install ccache | ||
| echo "::set-env name=CCACHE_INSTALLED::1" | ||
|
|
||
| - name: Cache vcpkg C++ dependencies | ||
| id: cache_vcpkg | ||
| uses: actions/cache@v2 | ||
| with: | ||
| path: external/vcpkg/installed | ||
| key: dev-vcpkg-${{ matrix.vcpkg_triplet }}-${{ hashFiles(format('{0}', env.VCPKG_RESPONSE_FILE)) }}-${{ hashFiles('.git/modules/external/vcpkg/HEAD') }} | ||
|
|
||
| - name: Install vcpkg packages (windows) | ||
| if: steps.cache_vcpkg.outputs.cache-hit!='true' && startsWith(matrix.os, 'windows') | ||
| run: | | ||
| ${{ github.workspace }}/external/vcpkg/bootstrap-vcpkg.bat -disableMetrics | ||
| ${{ github.workspace }}/external/vcpkg/vcpkg install @${{env.VCPKG_RESPONSE_FILE}} | ||
|
|
||
| - name: Install vcpkg packages (mac and linux) | ||
| if: steps.cache_vcpkg.outputs.cache-hit!='true' && startsWith(matrix.os, 'windows')!='true' | ||
DellaBitta marked this conversation as resolved.
Show resolved
Hide resolved
|
||
| run: | | ||
| ${{ github.workspace }}/external/vcpkg/bootstrap-vcpkg.sh -disableMetrics | ||
| ${{ github.workspace }}/external/vcpkg/vcpkg install @${{env.VCPKG_RESPONSE_FILE}} | ||
|
|
||
| - name: Setup python | ||
| uses: actions/setup-python@v2 | ||
| with: | ||
| python-version: ${{ matrix.python_version }} | ||
| architecture: ${{ matrix.architecture }} | ||
|
|
||
| - name: Get pip cache dir | ||
| id: get_pip_cache_dir | ||
| run: | | ||
| echo "::set-output name=cachedir::$(pip cache dir)" | ||
|
|
||
| - name: pip cache | ||
| id: cache_pip | ||
| uses: actions/cache@v2 | ||
| with: | ||
| path: ${{ steps.get_pip_cache_dir.outputs.cachedir }} | ||
| key: dev-pip-${{ runner.os }}-${{ matrix.python_version }}-${{ matrix.architecture }}-${{ hashFiles(format('{0}', env.PIP_REQUIREMENTS_FILE)) }} | ||
|
|
||
| - name: Install pip packages | ||
| run: | | ||
| python -m pip install --upgrade pip | ||
| pip install -r ${{ env.PIP_REQUIREMENTS_FILE }} | ||
|
|
||
| - name: Cache ccache files | ||
| if: env.CCACHE_INSTALLED | ||
| id: cache_ccache | ||
| uses: actions/cache@v2 | ||
| with: | ||
| path: ccache_dir | ||
| key: dev-test-ccache-${{ env.MATRIX_UNIQUE_NAME }} | ||
|
|
||
| - name: Configure | ||
| shell: bash | ||
| run: | | ||
| mkdir build | ||
| cmake \ | ||
| -S . \ | ||
| -B build \ | ||
| -G "${{ matrix.generator }}" \ | ||
| -DCMAKE_BUILD_TYPE=${{ matrix.build_type }} \ | ||
| -DCMAKE_TOOLCHAIN_FILE=external/vcpkg/scripts/buildsystems/vcpkg.cmake \ | ||
| -DVCPKG_TARGET_TRIPLET=${{ matrix.vcpkg_triplet }} \ | ||
|
|
||
| - name: Build | ||
| shell: bash | ||
| run: cmake --build build --config ${{ matrix.build_type }} -j 8 | ||
|
|
||
| - name: Stats for ccache (mac and linux) | ||
| if: env.CCACHE_INSTALLED | ||
| run: ccache -s | ||
|
|
||
| - name: Print built libraries | ||
| shell: bash | ||
| run: | | ||
| find build -name "*.lib" | ||
| find build -name "*.dll" | ||
| find build -name "*.dylib" | ||
| find build -name "*.a" | ||
| find build -name "*.so" | ||
This file contains hidden or 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,91 @@ | ||
| name: Windows Builds | ||
|
|
||
| on: | ||
| push: | ||
| pull_request: | ||
|
|
||
| jobs: | ||
| build: | ||
| name: ${{ matrix.os }}-${{ matrix.build_type }}-${{ matrix.architecture }}-${{ matrix.python_version }}-${{ matrix.generator }} | ||
| runs-on: ${{ matrix.os }} | ||
| strategy: | ||
| # If any of the configurations fail, others will proceed to run | ||
| fail-fast: false | ||
| matrix: | ||
| os: [windows-latest,] | ||
| build_type: ["Release"] | ||
| architecture: ["x64",] | ||
| python_version: [2.7] | ||
| generator: ["Visual Studio 16 2019",] | ||
| include: | ||
| - os: windows-latest | ||
| architecture: "x64" | ||
| vcpkg_triplet: "x64-windows-static" | ||
| # For x64, this variable probably doesnt make sense but | ||
| # for x86, the command line argument to pass to cmake is -A Win32 and not -A x86 | ||
| msbuild_platform: "x64" | ||
|
|
||
| steps: | ||
| # Check out with submodule (vcpkg is a submodule) | ||
| - uses: actions/checkout@v2 | ||
| with: | ||
| submodules: true | ||
|
|
||
| - name: Set env variables for subsequent steps (all) | ||
| run: | | ||
| echo "::set-env name=VCPKG_RESPONSE_FILE::external/vcpkg_${{ matrix.vcpkg_triplet }}_response_file.txt" | ||
| echo "::set-env name=PIP_REQUIREMENTS_FILE::external/pip_requirements.txt" | ||
|
|
||
| - name: Install Ninja | ||
| if: startsWith(matrix.generator, 'Ninja') && startsWith(matrix.os, 'windows') | ||
| run: | | ||
| choco install ninja | ||
|
|
||
| - name: Cache vcpkg C++ dependencies | ||
| id: cache_vcpkg | ||
| uses: actions/cache@v2 | ||
| with: | ||
| path: external/vcpkg/installed | ||
| key: dev-vcpkg-${{ matrix.vcpkg_triplet }}-${{ hashFiles(format('{0}', env.VCPKG_RESPONSE_FILE)) }}-${{ hashFiles('.git/modules/external/vcpkg/HEAD') }} | ||
|
|
||
| - name: Install vcpkg packages (windows) | ||
| if: steps.cache_vcpkg.outputs.cache-hit!='true' && startsWith(matrix.os, 'windows') | ||
| run: | | ||
| ${{ github.workspace }}/external/vcpkg/bootstrap-vcpkg.bat -disableMetrics | ||
| ${{ github.workspace }}/external/vcpkg/vcpkg install @${{env.VCPKG_RESPONSE_FILE}} | ||
|
|
||
| - name: Setup python | ||
| uses: actions/setup-python@v2 | ||
| with: | ||
| python-version: ${{ matrix.python_version }} | ||
| architecture: ${{ matrix.architecture }} | ||
|
|
||
| - name: Install pip packages | ||
| run: | | ||
| python -m pip install --upgrade pip | ||
| pip install -r ${{ env.PIP_REQUIREMENTS_FILE }} | ||
|
|
||
| - name: Configure | ||
| shell: bash | ||
| run: | | ||
| mkdir build | ||
| cmake \ | ||
| -S . \ | ||
| -B build \ | ||
| -G "${{ matrix.generator }}" \ | ||
| -DCMAKE_BUILD_TYPE=${{ matrix.build_type }} \ | ||
| -DCMAKE_TOOLCHAIN_FILE=external/vcpkg/scripts/buildsystems/vcpkg.cmake \ | ||
| -DVCPKG_TARGET_TRIPLET=${{ matrix.vcpkg_triplet }} \ | ||
|
|
||
| - name: Build | ||
| shell: bash | ||
| run: cmake --build build --config ${{ matrix.build_type }} -j 8 | ||
|
|
||
| - name: Print built libraries | ||
| shell: bash | ||
| run: | | ||
| find build -name "*.lib" | ||
| find build -name "*.dll" | ||
| find build -name "*.dylib" | ||
| find build -name "*.a" | ||
| find build -name "*.so" |
This file contains hidden or 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,3 @@ | ||
| [submodule "external/vcpkg"] | ||
| path = external/vcpkg | ||
| url = https://github.com/microsoft/vcpkg.git |
This file contains hidden or 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
This file contains hidden or 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,2 @@ | ||
| absl-py | ||
| protobuf |
This file contains hidden or 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,6 @@ | ||
| openssl | ||
| protobuf | ||
| zlib | ||
| abseil | ||
| --triplet | ||
| x64-linux |
This file contains hidden or 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,6 @@ | ||
| openssl | ||
| protobuf | ||
| zlib | ||
| abseil | ||
| --triplet | ||
| x64-osx |
This file contains hidden or 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,6 @@ | ||
| openssl | ||
| protobuf | ||
| zlib | ||
| abseil | ||
| --triplet | ||
| x64-windows-static |
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.