diff --git a/.github/config/ubuntu-22.04-clang-15/conan/profiles/host b/.github/config/ubuntu-22.04-clang-15/conan/profiles/host new file mode 120000 index 0000000..331d858 --- /dev/null +++ b/.github/config/ubuntu-22.04-clang-15/conan/profiles/host @@ -0,0 +1 @@ +default \ No newline at end of file diff --git a/.github/config/ubuntu-22.04-ndk-26.3/conan/profiles/armv8 b/.github/config/ubuntu-22.04-ndk-26.3/conan/profiles/armv8 new file mode 100644 index 0000000..9ff2e06 --- /dev/null +++ b/.github/config/ubuntu-22.04-ndk-26.3/conan/profiles/armv8 @@ -0,0 +1,4 @@ +include(host) + +[settings] +arch=armv8 diff --git a/.github/config/ubuntu-22.04-ndk-26.3/conan/profiles/default b/.github/config/ubuntu-22.04-ndk-26.3/conan/profiles/default deleted file mode 100644 index f43d6de..0000000 --- a/.github/config/ubuntu-22.04-ndk-26.3/conan/profiles/default +++ /dev/null @@ -1,11 +0,0 @@ -[settings] -arch=x86_64 -build_type=Release -compiler=clang -compiler.version=15 -compiler.cppstd=17 -compiler.libcxx=libstdc++11 -os=Linux - -[conf] -tools.build:compiler_executables={'c': 'clang-15', 'cpp': 'clang++-15'} diff --git a/.github/config/ubuntu-22.04-ndk-26.3/conan/profiles/default b/.github/config/ubuntu-22.04-ndk-26.3/conan/profiles/default new file mode 120000 index 0000000..0ceaa4c --- /dev/null +++ b/.github/config/ubuntu-22.04-ndk-26.3/conan/profiles/default @@ -0,0 +1 @@ +../../../ubuntu-22.04-clang-15/conan/profiles/default \ No newline at end of file diff --git a/.github/config/ubuntu-22.04-ndk-26.3/conan/profiles/ndk-26.3 b/.github/config/ubuntu-22.04-ndk-26.3/conan/profiles/host similarity index 61% rename from .github/config/ubuntu-22.04-ndk-26.3/conan/profiles/ndk-26.3 rename to .github/config/ubuntu-22.04-ndk-26.3/conan/profiles/host index ff527d8..6274fb1 100644 --- a/.github/config/ubuntu-22.04-ndk-26.3/conan/profiles/ndk-26.3 +++ b/.github/config/ubuntu-22.04-ndk-26.3/conan/profiles/host @@ -1,4 +1,4 @@ -#include(default) +include(default) [settings] os=Android @@ -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 diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index dbff166..59c269d 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -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 @@ -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 @@ -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 @@ -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'