-
Notifications
You must be signed in to change notification settings - Fork 220
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #924 from yvt/patch-vcpkg
Adopt vcpkg and streamline the build process
- Loading branch information
Showing
18 changed files
with
326 additions
and
2,759 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 |
---|---|---|
@@ -0,0 +1,69 @@ | ||
name: CI | ||
on: | ||
pull_request: | ||
push: | ||
|
||
jobs: | ||
build-windows: | ||
name: Build (Windows) | ||
runs-on: windows-2019 | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v1 | ||
with: | ||
submodules: true | ||
path: openspades | ||
|
||
- name: Cache vcpkg and dependencies | ||
uses: actions/cache@v2 | ||
with: | ||
path: | | ||
vcpkg/installed | ||
!.git | ||
key: ${{ runner.os }}-${{ hashFiles('vcpkg_x86-windows.txt', '.gitmodules') }} | ||
|
||
- name: Bootstrap vcpkg | ||
run: vcpkg/bootstrap-vcpkg.bat | ||
|
||
- name: Build dependencies | ||
run: vcpkg/vcpkg install @vcpkg_x86-windows.txt | ||
|
||
- name: Build application | ||
uses: ashutoshvarma/action-cmake-build@master | ||
with: | ||
build-dir: ${{ runner.workspace }}/openspades.mk | ||
build-type: RelWithDebInfo | ||
configure-options: -A Win32 -D CMAKE_BUILD_TYPE=RelWithDebInfo -D CMAKE_TOOLCHAIN_FILE=${{ runner.workspace }}/openspades/vcpkg/scripts/buildsystems/vcpkg.cmake -D VCPKG_TARGET_TRIPLET=x86-windows-static | ||
parallel: 8 | ||
|
||
build-macos: | ||
name: Build (macOS) | ||
runs-on: macos-10.15 | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v1 | ||
with: | ||
submodules: true | ||
path: openspades | ||
|
||
- name: Cache vcpkg and dependencies | ||
uses: actions/cache@v2 | ||
with: | ||
path: | | ||
vcpkg/installed | ||
!.git | ||
key: ${{ runner.os }}-${{ hashFiles('vcpkg_x86_64-darwin.txt', '.gitmodules') }} | ||
|
||
- name: Bootstrap vcpkg | ||
run: vcpkg/bootstrap-vcpkg.sh | ||
|
||
- name: Build dependencies | ||
run: vcpkg/vcpkg install @vcpkg_x86_64-darwin.txt | ||
|
||
- name: Build application | ||
uses: ashutoshvarma/action-cmake-build@master | ||
with: | ||
build-dir: ${{ runner.workspace }}/openspades.mk | ||
build-type: RelWithDebInfo | ||
configure-options: -D CMAKE_BUILD_TYPE=RelWithDebInfo -D CMAKE_TOOLCHAIN_FILE=${{ runner.workspace }}/openspades/vcpkg/scripts/buildsystems/vcpkg.cmake -D VCPKG_TARGET_TRIPLET=x64-osx -D CMAKE_OSX_ARCHITECTURES=x86_64 | ||
parallel: 8 |
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
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 |
---|---|---|
@@ -1,3 +1,6 @@ | ||
[submodule "flatpak/shared-modules"] | ||
path = flatpak/shared-modules | ||
url = https://github.com/flathub/shared-modules.git | ||
[submodule "vcpkg"] | ||
path = vcpkg | ||
url = https://github.com/microsoft/vcpkg.git |
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
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.