-
Notifications
You must be signed in to change notification settings - Fork 4
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 #10 from janisozaur/vcpkg-builds-in-ci
vcpkg builds in ci
- Loading branch information
Showing
10 changed files
with
110 additions
and
428 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,58 @@ | ||
name: CI | ||
|
||
on: | ||
push: | ||
branches: [ "master" ] | ||
pull_request: | ||
branches: [ "master" ] | ||
|
||
jobs: | ||
build-docker: | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- uses: actions/checkout@v4 | ||
|
||
- name: Build docker image | ||
run: docker build . -t vcpkg-build | ||
|
||
- name: Save docker image | ||
run: | | ||
docker save -o vcpkg-build.tar vcpkg-build | ||
zstd vcpkg-build.tar | ||
- name: Upload docker image | ||
uses: actions/upload-artifact@v4 | ||
with: | ||
path: vcpkg-build.tar.zst | ||
name: vcpkg-build.tar.zst | ||
compression-level: 0 | ||
download: | ||
needs: build-docker | ||
runs-on: ubuntu-latest | ||
strategy: | ||
matrix: | ||
arch: [arm64, x64] | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- name: Download All Artifacts | ||
uses: actions/download-artifact@v4 | ||
with: | ||
pattern: vcpkg-build.tar.zst | ||
- name: Load image | ||
run: | | ||
zstd -d vcpkg-build.tar.zst/vcpkg-build.tar.zst | ||
docker load --input vcpkg-build.tar.zst/vcpkg-build.tar | ||
- name: Build ${{ matrix.arch }} libraries | ||
run: docker run -v $(pwd)/project:/project -t vcpkg-build vcpkg install --triplet ${{ matrix.arch }}-android-dynamic | ||
|
||
- name: Archive libraries | ||
run: tar -c --zstd -f ${{ matrix.arch }}-android-dynamic.tar.zst -C project/vcpkg_installed/ ${{ matrix.arch }}-android-dynamic | ||
|
||
- name: Upload libraries | ||
uses: actions/upload-artifact@v4 | ||
with: | ||
path: ${{ matrix.arch }}-android-dynamic.tar.zst | ||
name: ${{ matrix.arch }}-android-dynamic.tar.zst | ||
compression-level: 1 |
This file was deleted.
Oops, something went wrong.
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,29 @@ | ||
FROM ubuntu:22.04 | ||
|
||
ENV DEBIAN_FRONTEND noninteractive | ||
|
||
RUN \ | ||
apt-get update && \ | ||
apt-get -y upgrade | ||
|
||
RUN \ | ||
apt-get -y --no-install-recommends install git g++ wget curl zip vim pkg-config tar cmake unzip ca-certificates python3 autoconf autoconf-archive autotools-dev automake make | ||
|
||
# Download Android NDK | ||
RUN \ | ||
wget https://dl.google.com/android/repository/android-ndk-r26c-linux.zip && \ | ||
unzip android-ndk-r26c-linux.zip && \ | ||
rm -rf android-ndk-r26c-linux.zip | ||
|
||
ENV ANDROID_NDK_HOME /android-ndk-r26c | ||
|
||
RUN git clone https://github.com/microsoft/vcpkg | ||
WORKDIR vcpkg | ||
RUN ./bootstrap-vcpkg.sh | ||
|
||
COPY arm64-android-dynamic.cmake x64-android-dynamic.cmake /vcpkg/triplets/ | ||
|
||
ENV PATH "/vcpkg:$PATH" | ||
ENV VCPKG_ROOT "/vcpkg" | ||
|
||
WORKDIR /project |
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,6 @@ | ||
set(VCPKG_TARGET_ARCHITECTURE arm64) | ||
set(VCPKG_CRT_LINKAGE dynamic) | ||
set(VCPKG_LIBRARY_LINKAGE dynamic) | ||
set(VCPKG_CMAKE_SYSTEM_NAME Android) | ||
set(VCPKG_MAKE_BUILD_TRIPLET "--host=aarch64-linux-android") | ||
set(VCPKG_CMAKE_CONFIGURE_OPTIONS -DANDROID_ABI=arm64-v8a) |
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.