Skip to content

Commit

Permalink
Update profile logic
Browse files Browse the repository at this point in the history
  • Loading branch information
ViliusSutkus89 committed Jun 15, 2024
1 parent ddc1001 commit b178c5b
Show file tree
Hide file tree
Showing 5 changed files with 21 additions and 21 deletions.
1 change: 1 addition & 0 deletions .github/config/ubuntu-22.04-clang-15/conan/profiles/host
4 changes: 4 additions & 0 deletions .github/config/ubuntu-22.04-ndk-26.3/conan/profiles/armv8
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
include(host)

[settings]
arch=armv8
11 changes: 0 additions & 11 deletions .github/config/ubuntu-22.04-ndk-26.3/conan/profiles/default

This file was deleted.

Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#include(default)
include(default)

[settings]
os=Android
Expand All @@ -10,4 +10,4 @@ compiler.libcxx=c++_static
compiler.cppstd=20

[conf]
tools.android:ndk_path=/usr/local/lib/android/sdk/ndk/26.3.11579264
tools.android:ndk_path=$ANDROID_HOME/ndk/26.3.11579264
21 changes: 13 additions & 8 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -48,8 +48,8 @@ jobs:
matrix:
package: ${{ fromJson(needs.find-all-packages.outputs.packages) }}
config:
# - { os: ubuntu-22.04, compiler: clang-15 }
- { os: ubuntu-22.04, compiler: ndk-26.3, ndk-version: 26.3.11579264 }
# - { os: ubuntu-22.04, compiler: clang-15, host-profile: host }
- { os: ubuntu-22.04, compiler: ndk-26.3.11579264, host-profile: armv8 }
steps:
- name: checkout
uses: actions/checkout@v4
Expand All @@ -67,7 +67,12 @@ jobs:

- name: install ndk
if: startsWith(matrix.config.compiler, 'ndk-')
run: echo "y" | sudo ${ANDROID_HOME}/cmdline-tools/latest/bin/sdkmanager --install "cmake;3.22.1" "ndk;${{ matrix.config.ndk-version }}"
run: echo "y" | sudo ${ANDROID_HOME}/cmdline-tools/latest/bin/sdkmanager --install `echo "${{ matrix.config.compiler }}" | tr - ";"`
- name: expand ANDROID_HOME env var in conan profile
if: startsWith(matrix.config.compiler, 'ndk-')
run: |
perl -pi -e "s/\$ANDROID_HOME/$ANDROID_HOME/g" .github/config/${{ matrix.config.os }}-${{ matrix.config.compiler }}/conan/*
cat .github/config/${{ matrix.config.os }}-${{ matrix.config.compiler }}/conan/*
- name: setup python 3.12
uses: actions/setup-python@v5
Expand Down Expand Up @@ -96,21 +101,21 @@ jobs:
# ${{ matrix.config.os }}-${{ matrix.config.compiler }}-

- name: conan install
run: conan install ${{ matrix.package.conanfile }} --version ${{ matrix.package.version }} --build missing --profile ndk-26.3
run: conan install ${{ matrix.package.conanfile }} --version ${{ matrix.package.version }} --build missing --profile:host ${{ matrix.config.host-profile }}

- name: conan graph
if: always()
run: conan graph info ${{ matrix.package.conanfile }} --version ${{ matrix.package.version }} --format=html --profile ndk-26.3 > graph.html
run: conan graph info ${{ matrix.package.conanfile }} --version ${{ matrix.package.version }} --format=html --profile:host ${{ matrix.config.host-profile }} > graph.html
- uses: actions/upload-artifact@v4
if: always()
with:
name: graph.html
name: ${{ matrix.package.conanfile }}-${{ matrix.package.version }}-${{ matrix.config.os }}-${{ matrix.config.compiler }}-${{ matrix.config.host-profile }}
path: graph.html

- name: conan source
run: conan source ${{ matrix.package.conanfile }} --version ${{ matrix.package.version }}
- name: conan build
run: conan build ${{ matrix.package.conanfile }} --version ${{ matrix.package.version }} --profile ndk-26.3
run: conan build ${{ matrix.package.conanfile }} --version ${{ matrix.package.version }} --profile:host ${{ matrix.config.host-profile }}
- name: conan export
run: conan export ${{ matrix.package.conanfile }} --version ${{ matrix.package.version }}
- name: conan export-pkg
Expand All @@ -119,7 +124,7 @@ jobs:
- name: conan test
run: |
test_conanfile=$(dirname ${{ matrix.package.conanfile }})/test_package/conanfile.py
conan test $test_conanfile ${{ matrix.package.package_version }} --build missing --profile ndk-26.3
conan test $test_conanfile ${{ matrix.package.package_version }} --build missing --profile:host ${{ matrix.config.host-profile }}
- name: conan upload
if: github.ref == 'refs/heads/main' || github.event_name == 'workflow_dispatch'
Expand Down

0 comments on commit b178c5b

Please sign in to comment.