From b0580fcd2f01ed8b876f1e97d2601d3283e3c5e5 Mon Sep 17 00:00:00 2001 From: Vilius Sutkus '89 Date: Sat, 15 Jun 2024 19:03:55 +0300 Subject: [PATCH 01/27] Squash commits - Build for Android --- .../ubuntu-22.04-clang-15/conan/profiles/host | 1 + .../conan/profiles/armv7 | 4 +++ .../conan/profiles/armv8 | 4 +++ .../conan/profiles/default | 1 + .../conan/profiles/host | 13 +++++++++ .../conan/profiles/x86 | 4 +++ .../conan/profiles/x86_64 | 4 +++ .github/workflows/build.yml | 29 ++++++++++++++++--- 8 files changed, 56 insertions(+), 4 deletions(-) create mode 120000 .github/config/ubuntu-22.04-clang-15/conan/profiles/host create mode 100644 .github/config/ubuntu-22.04-ndk-26.3.11579264/conan/profiles/armv7 create mode 100644 .github/config/ubuntu-22.04-ndk-26.3.11579264/conan/profiles/armv8 create mode 120000 .github/config/ubuntu-22.04-ndk-26.3.11579264/conan/profiles/default create mode 100644 .github/config/ubuntu-22.04-ndk-26.3.11579264/conan/profiles/host create mode 100644 .github/config/ubuntu-22.04-ndk-26.3.11579264/conan/profiles/x86 create mode 100644 .github/config/ubuntu-22.04-ndk-26.3.11579264/conan/profiles/x86_64 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.11579264/conan/profiles/armv7 b/.github/config/ubuntu-22.04-ndk-26.3.11579264/conan/profiles/armv7 new file mode 100644 index 0000000..26ec1a9 --- /dev/null +++ b/.github/config/ubuntu-22.04-ndk-26.3.11579264/conan/profiles/armv7 @@ -0,0 +1,4 @@ +include(host) + +[settings] +arch=armv7 diff --git a/.github/config/ubuntu-22.04-ndk-26.3.11579264/conan/profiles/armv8 b/.github/config/ubuntu-22.04-ndk-26.3.11579264/conan/profiles/armv8 new file mode 100644 index 0000000..9ff2e06 --- /dev/null +++ b/.github/config/ubuntu-22.04-ndk-26.3.11579264/conan/profiles/armv8 @@ -0,0 +1,4 @@ +include(host) + +[settings] +arch=armv8 diff --git a/.github/config/ubuntu-22.04-ndk-26.3.11579264/conan/profiles/default b/.github/config/ubuntu-22.04-ndk-26.3.11579264/conan/profiles/default new file mode 120000 index 0000000..0ceaa4c --- /dev/null +++ b/.github/config/ubuntu-22.04-ndk-26.3.11579264/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.11579264/conan/profiles/host b/.github/config/ubuntu-22.04-ndk-26.3.11579264/conan/profiles/host new file mode 100644 index 0000000..6274fb1 --- /dev/null +++ b/.github/config/ubuntu-22.04-ndk-26.3.11579264/conan/profiles/host @@ -0,0 +1,13 @@ +include(default) + +[settings] +os=Android +os.api_level=23 +arch=armv8 +compiler=clang +compiler.version=17 +compiler.libcxx=c++_static +compiler.cppstd=20 + +[conf] +tools.android:ndk_path=$ANDROID_HOME/ndk/26.3.11579264 diff --git a/.github/config/ubuntu-22.04-ndk-26.3.11579264/conan/profiles/x86 b/.github/config/ubuntu-22.04-ndk-26.3.11579264/conan/profiles/x86 new file mode 100644 index 0000000..77b3565 --- /dev/null +++ b/.github/config/ubuntu-22.04-ndk-26.3.11579264/conan/profiles/x86 @@ -0,0 +1,4 @@ +include(host) + +[settings] +arch=x86 diff --git a/.github/config/ubuntu-22.04-ndk-26.3.11579264/conan/profiles/x86_64 b/.github/config/ubuntu-22.04-ndk-26.3.11579264/conan/profiles/x86_64 new file mode 100644 index 0000000..7c1d9db --- /dev/null +++ b/.github/config/ubuntu-22.04-ndk-26.3.11579264/conan/profiles/x86_64 @@ -0,0 +1,4 @@ +include(host) + +[settings] +arch=x86_64 diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index c4a3fba..f876fe8 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -48,7 +48,11 @@ jobs: matrix: package: ${{ fromJson(needs.find-all-packages.outputs.packages) }} config: - - { os: ubuntu-22.04, compiler: clang-15 } + - { os: ubuntu-22.04, compiler: clang-15, host-profile: host } + - { os: ubuntu-22.04, compiler: ndk-26.3.11579264, host-profile: armv8 } + - { os: ubuntu-22.04, compiler: ndk-26.3.11579264, host-profile: x86_64 } + - { os: ubuntu-22.04, compiler: ndk-26.3.11579264, host-profile: armv7 } + - { os: ubuntu-22.04, compiler: ndk-26.3.11579264, host-profile: x86 } steps: - name: checkout uses: actions/checkout@v4 @@ -64,6 +68,13 @@ jobs: brew install ccache ccache -V + - name: install ndk + if: startsWith(matrix.config.compiler, 'ndk-') + 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/$ENV{ANDROID_HOME}/g' .github/config/${{ matrix.config.os }}-${{ matrix.config.compiler }}/conan/profiles/host + - name: setup python 3.12 uses: actions/setup-python@v5 with: @@ -89,11 +100,21 @@ jobs: ${{ matrix.config.os }}-${{ matrix.config.compiler }}- - name: conan install - run: conan install ${{ matrix.package.conanfile }} --version ${{ matrix.package.version }} --build missing + 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:host ${{ matrix.config.host-profile }} > graph.html + - uses: actions/upload-artifact@v4 + if: always() + with: + name: graph.html.${{ matrix.package.package }}-${{ 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 }} + 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 @@ -102,7 +123,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 + 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' From a8405c0e21270b08ac8142dcc4ecf24d3a8aca5d Mon Sep 17 00:00:00 2001 From: Vilius Sutkus '89 Date: Sun, 16 Jun 2024 09:34:55 +0300 Subject: [PATCH 02/27] [CI] Use host profile when exporting binary pkg --- .github/workflows/build.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index f876fe8..e4b8072 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -118,7 +118,7 @@ jobs: - name: conan export run: conan export ${{ matrix.package.conanfile }} --version ${{ matrix.package.version }} - name: conan export-pkg - run: conan export-pkg ${{ matrix.package.conanfile }} --version ${{ matrix.package.version }} + run: conan export-pkg ${{ matrix.package.conanfile }} --version ${{ matrix.package.version }} --profile:host ${{ matrix.config.host-profile }} - name: conan test run: | From 220e557f0b77595ee41ac33f22f101c38764e8d5 Mon Sep 17 00:00:00 2001 From: Vilius Sutkus '89 Date: Sun, 16 Jun 2024 16:53:59 +0300 Subject: [PATCH 03/27] Remove conan graph, it generated way too much files --- .github/workflows/build.yml | 10 ---------- 1 file changed, 10 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index e4b8072..d837725 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -101,16 +101,6 @@ jobs: - name: conan install 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:host ${{ matrix.config.host-profile }} > graph.html - - uses: actions/upload-artifact@v4 - if: always() - with: - name: graph.html.${{ matrix.package.package }}-${{ 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 From b3088ef6fb175b95d4e79a3c784b951ec0e79c4d Mon Sep 17 00:00:00 2001 From: Vilius Sutkus '89 Date: Sun, 16 Jun 2024 16:54:44 +0300 Subject: [PATCH 04/27] Login to artifactory only if there will be an actual upload --- .github/workflows/build.yml | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index d837725..f0be101 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -84,8 +84,6 @@ jobs: - name: conan remote run: conan remote add --index 0 odr https://artifactory.opendocument.app/artifactory/api/conan/conan - - name: conan login - run: conan remote login odr admin --password ${{ secrets.ARTIFACTORY }} - name: conan config run: conan config install .github/config/${{ matrix.config.os }}-${{ matrix.config.compiler }}/conan @@ -115,6 +113,10 @@ jobs: test_conanfile=$(dirname ${{ matrix.package.conanfile }})/test_package/conanfile.py conan test $test_conanfile ${{ matrix.package.package_version }} --build missing --profile:host ${{ matrix.config.host-profile }} + - name: conan login + if: github.ref == 'refs/heads/main' || github.event_name == 'workflow_dispatch' + run: conan remote login odr admin --password ${{ secrets.ARTIFACTORY }} + - name: conan upload if: github.ref == 'refs/heads/main' || github.event_name == 'workflow_dispatch' run: conan upload "*" --check --confirm --remote odr From b2cba3f908961f6d13715339d76025ddc699f957 Mon Sep 17 00:00:00 2001 From: Vilius Sutkus '89 Date: Sun, 16 Jun 2024 16:56:06 +0300 Subject: [PATCH 05/27] Update build matrix --- .../conan/profiles/armv7 | 4 -- .../conan/profiles/armv8 | 4 -- .../conan/profiles/default | 1 - .../conan/profiles/x86 | 4 -- .../conan/profiles/x86_64 | 4 -- .../conan/profiles/android-armv8} | 5 +-- .../conan/profiles/default | 4 +- .../conan/profiles/ubuntu} | 0 .github/workflows/build.yml | 38 +++++++++---------- 9 files changed, 22 insertions(+), 42 deletions(-) delete mode 100644 .github/config/ubuntu-22.04-ndk-26.3.11579264/conan/profiles/armv7 delete mode 100644 .github/config/ubuntu-22.04-ndk-26.3.11579264/conan/profiles/armv8 delete mode 120000 .github/config/ubuntu-22.04-ndk-26.3.11579264/conan/profiles/default delete mode 100644 .github/config/ubuntu-22.04-ndk-26.3.11579264/conan/profiles/x86 delete mode 100644 .github/config/ubuntu-22.04-ndk-26.3.11579264/conan/profiles/x86_64 rename .github/config/{ubuntu-22.04-ndk-26.3.11579264/conan/profiles/host => ubuntu-22.04/conan/profiles/android-armv8} (88%) rename .github/config/{ubuntu-22.04-clang-15 => ubuntu-22.04}/conan/profiles/default (88%) rename .github/config/{ubuntu-22.04-clang-15/conan/profiles/host => ubuntu-22.04/conan/profiles/ubuntu} (100%) diff --git a/.github/config/ubuntu-22.04-ndk-26.3.11579264/conan/profiles/armv7 b/.github/config/ubuntu-22.04-ndk-26.3.11579264/conan/profiles/armv7 deleted file mode 100644 index 26ec1a9..0000000 --- a/.github/config/ubuntu-22.04-ndk-26.3.11579264/conan/profiles/armv7 +++ /dev/null @@ -1,4 +0,0 @@ -include(host) - -[settings] -arch=armv7 diff --git a/.github/config/ubuntu-22.04-ndk-26.3.11579264/conan/profiles/armv8 b/.github/config/ubuntu-22.04-ndk-26.3.11579264/conan/profiles/armv8 deleted file mode 100644 index 9ff2e06..0000000 --- a/.github/config/ubuntu-22.04-ndk-26.3.11579264/conan/profiles/armv8 +++ /dev/null @@ -1,4 +0,0 @@ -include(host) - -[settings] -arch=armv8 diff --git a/.github/config/ubuntu-22.04-ndk-26.3.11579264/conan/profiles/default b/.github/config/ubuntu-22.04-ndk-26.3.11579264/conan/profiles/default deleted file mode 120000 index 0ceaa4c..0000000 --- a/.github/config/ubuntu-22.04-ndk-26.3.11579264/conan/profiles/default +++ /dev/null @@ -1 +0,0 @@ -../../../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.11579264/conan/profiles/x86 b/.github/config/ubuntu-22.04-ndk-26.3.11579264/conan/profiles/x86 deleted file mode 100644 index 77b3565..0000000 --- a/.github/config/ubuntu-22.04-ndk-26.3.11579264/conan/profiles/x86 +++ /dev/null @@ -1,4 +0,0 @@ -include(host) - -[settings] -arch=x86 diff --git a/.github/config/ubuntu-22.04-ndk-26.3.11579264/conan/profiles/x86_64 b/.github/config/ubuntu-22.04-ndk-26.3.11579264/conan/profiles/x86_64 deleted file mode 100644 index 7c1d9db..0000000 --- a/.github/config/ubuntu-22.04-ndk-26.3.11579264/conan/profiles/x86_64 +++ /dev/null @@ -1,4 +0,0 @@ -include(host) - -[settings] -arch=x86_64 diff --git a/.github/config/ubuntu-22.04-ndk-26.3.11579264/conan/profiles/host b/.github/config/ubuntu-22.04/conan/profiles/android-armv8 similarity index 88% rename from .github/config/ubuntu-22.04-ndk-26.3.11579264/conan/profiles/host rename to .github/config/ubuntu-22.04/conan/profiles/android-armv8 index 6274fb1..c6da10d 100644 --- a/.github/config/ubuntu-22.04-ndk-26.3.11579264/conan/profiles/host +++ b/.github/config/ubuntu-22.04/conan/profiles/android-armv8 @@ -1,13 +1,12 @@ -include(default) - [settings] os=Android os.api_level=23 arch=armv8 +build_type=RelWithDebInfo compiler=clang compiler.version=17 -compiler.libcxx=c++_static compiler.cppstd=20 +compiler.libcxx=c++_static [conf] tools.android:ndk_path=$ANDROID_HOME/ndk/26.3.11579264 diff --git a/.github/config/ubuntu-22.04-clang-15/conan/profiles/default b/.github/config/ubuntu-22.04/conan/profiles/default similarity index 88% rename from .github/config/ubuntu-22.04-clang-15/conan/profiles/default rename to .github/config/ubuntu-22.04/conan/profiles/default index f43d6de..0787ebb 100644 --- a/.github/config/ubuntu-22.04-clang-15/conan/profiles/default +++ b/.github/config/ubuntu-22.04/conan/profiles/default @@ -1,11 +1,11 @@ [settings] +os=Linux arch=x86_64 -build_type=Release +build_type=RelWithDebInfo 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-clang-15/conan/profiles/host b/.github/config/ubuntu-22.04/conan/profiles/ubuntu similarity index 100% rename from .github/config/ubuntu-22.04-clang-15/conan/profiles/host rename to .github/config/ubuntu-22.04/conan/profiles/ubuntu diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index f0be101..9998f43 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -40,7 +40,7 @@ jobs: run: python scripts/list_package_versions.py --github | tee $GITHUB_OUTPUT build: - runs-on: ${{ matrix.config.os }} + runs-on: ${{ matrix.config.build_machine }} needs: - find-all-packages strategy: @@ -48,11 +48,8 @@ jobs: matrix: package: ${{ fromJson(needs.find-all-packages.outputs.packages) }} config: - - { os: ubuntu-22.04, compiler: clang-15, host-profile: host } - - { os: ubuntu-22.04, compiler: ndk-26.3.11579264, host-profile: armv8 } - - { os: ubuntu-22.04, compiler: ndk-26.3.11579264, host-profile: x86_64 } - - { os: ubuntu-22.04, compiler: ndk-26.3.11579264, host-profile: armv7 } - - { os: ubuntu-22.04, compiler: ndk-26.3.11579264, host-profile: x86 } + - { build_machine: ubuntu-22.04, host_profile: ubuntu } + - { build_machine: ubuntu-22.04, host_profile: android-armv8, ndk_version: 26.3.11579264 } steps: - name: checkout uses: actions/checkout@v4 @@ -68,13 +65,6 @@ jobs: brew install ccache ccache -V - - name: install ndk - if: startsWith(matrix.config.compiler, 'ndk-') - 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/$ENV{ANDROID_HOME}/g' .github/config/${{ matrix.config.os }}-${{ matrix.config.compiler }}/conan/profiles/host - - name: setup python 3.12 uses: actions/setup-python@v5 with: @@ -82,10 +72,18 @@ jobs: - name: install python dependencies run: pip install --upgrade pip conan + - name: install NDK and append path to conan profile + if: startsWith(matrix.config.host_profile, 'android') + run: | + echo "y" | sudo ${ANDROID_HOME}/cmdline-tools/latest/bin/sdkmanager --install "ndk;${{ matrix.config.ndk_version }}" + host_profile_file=.github/config/${{ matrix.config.build_machine }}/conan/profiles/${{ matrix.config.host_profile }} + echo "[conf]" >> $host_profile_file + echo "tools.android:ndk_path=$ANDROID_HOME/ndk/${{ matrix.config.ndk_version }}" >> $host_profile_file + - name: conan remote run: conan remote add --index 0 odr https://artifactory.opendocument.app/artifactory/api/conan/conan - name: conan config - run: conan config install .github/config/${{ matrix.config.os }}-${{ matrix.config.compiler }}/conan + run: conan config install .github/config/${{ matrix.config.build_machine }}/conan - name: cache uses: actions/cache@v4 @@ -93,25 +91,25 @@ jobs: path: | ~/.ccache /Users/runner/Library/Caches/ccache - key: ${{ matrix.config.os }}-${{ matrix.config.compiler }}-${{ env.CCACHE_KEY_SUFFIX }} + key: ${{ matrix.config.build_machine }}-${{ matrix.config.host_profile }}-${{ env.CCACHE_KEY_SUFFIX }} restore-keys: | - ${{ matrix.config.os }}-${{ matrix.config.compiler }}- + ${{ matrix.config.build_machine }}-${{ matrix.config.host_profile }}- - name: conan install - run: conan install ${{ matrix.package.conanfile }} --version ${{ matrix.package.version }} --build missing --profile:host ${{ matrix.config.host-profile }} + run: conan install ${{ matrix.package.conanfile }} --version ${{ matrix.package.version }} --build missing --profile:host ${{ matrix.config.host_profile }} - 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:host ${{ matrix.config.host-profile }} + 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 - run: conan export-pkg ${{ matrix.package.conanfile }} --version ${{ matrix.package.version }} --profile:host ${{ matrix.config.host-profile }} + run: conan export-pkg ${{ matrix.package.conanfile }} --version ${{ matrix.package.version }} --profile:host ${{ matrix.config.host_profile }} - 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:host ${{ matrix.config.host-profile }} + conan test $test_conanfile ${{ matrix.package.package_version }} --build missing --profile:host ${{ matrix.config.host_profile }} - name: conan login if: github.ref == 'refs/heads/main' || github.event_name == 'workflow_dispatch' From 64f73e77afe4871cb49c72324212ea0fdcb65cbc Mon Sep 17 00:00:00 2001 From: Vilius Sutkus '89 Date: Sun, 16 Jun 2024 17:25:55 +0300 Subject: [PATCH 06/27] Exclude odrcore/1.0.0 from build matrix when building for Android --- .github/workflows/build.yml | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 9998f43..2f32e8c 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -50,6 +50,10 @@ jobs: config: - { build_machine: ubuntu-22.04, host_profile: ubuntu } - { build_machine: ubuntu-22.04, host_profile: android-armv8, ndk_version: 26.3.11579264 } + # Known not working build configurations + exclude: + - package: { "package_version": "odrcore/1.0.0", "package": "odrcore", "version": "1.0.0", "conanfile": "recipes/odrcore/all/conanfile.py" } + config: { build_machine: ubuntu-22.04, host_profile: android-armv8, ndk_version: 26.3.11579264 } steps: - name: checkout uses: actions/checkout@v4 From 7d1a1bdb744d572112960a05a4a3f1fec800d79f Mon Sep 17 00:00:00 2001 From: Vilius Sutkus '89 Date: Mon, 17 Jun 2024 13:13:46 +0300 Subject: [PATCH 07/27] Use variables in conan profiles to set ANDROID_HOME --- .github/config/ubuntu-22.04/conan/profiles/android-armv8 | 5 ++++- .github/workflows/build.yml | 8 ++------ 2 files changed, 6 insertions(+), 7 deletions(-) diff --git a/.github/config/ubuntu-22.04/conan/profiles/android-armv8 b/.github/config/ubuntu-22.04/conan/profiles/android-armv8 index c6da10d..759d6f5 100644 --- a/.github/config/ubuntu-22.04/conan/profiles/android-armv8 +++ b/.github/config/ubuntu-22.04/conan/profiles/android-armv8 @@ -1,3 +1,6 @@ +{% set android_home = os.getenv("ANDROID_HOME") %} +{% set ndk_version = "26.3.11579264" %} + [settings] os=Android os.api_level=23 @@ -9,4 +12,4 @@ compiler.cppstd=20 compiler.libcxx=c++_static [conf] -tools.android:ndk_path=$ANDROID_HOME/ndk/26.3.11579264 +tools.android:ndk_path={{android_home}}/ndk/{{ndk_version}} diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 2f32e8c..e09ce0d 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -76,13 +76,9 @@ jobs: - name: install python dependencies run: pip install --upgrade pip conan - - name: install NDK and append path to conan profile + - name: install NDK if: startsWith(matrix.config.host_profile, 'android') - run: | - echo "y" | sudo ${ANDROID_HOME}/cmdline-tools/latest/bin/sdkmanager --install "ndk;${{ matrix.config.ndk_version }}" - host_profile_file=.github/config/${{ matrix.config.build_machine }}/conan/profiles/${{ matrix.config.host_profile }} - echo "[conf]" >> $host_profile_file - echo "tools.android:ndk_path=$ANDROID_HOME/ndk/${{ matrix.config.ndk_version }}" >> $host_profile_file + run: echo "y" | sudo ${ANDROID_HOME}/cmdline-tools/latest/bin/sdkmanager --install "ndk;${{ matrix.config.ndk_version }}" - name: conan remote run: conan remote add --index 0 odr https://artifactory.opendocument.app/artifactory/api/conan/conan From 300187e614d391d57e34acbb92116c7ca8c4ef2a Mon Sep 17 00:00:00 2001 From: Vilius Sutkus '89 Date: Tue, 18 Jun 2024 10:06:10 +0300 Subject: [PATCH 08/27] Use package/version and host profile as CI build job name --- .github/workflows/build.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index e09ce0d..98a8597 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -41,6 +41,7 @@ jobs: build: runs-on: ${{ matrix.config.build_machine }} + name: ${{ matrix.package.package_version }} - ${{ matrix.config.host_profile }} needs: - find-all-packages strategy: From 2ce3cb9ec676b0d880828a301fb7d35cd2663493 Mon Sep 17 00:00:00 2001 From: Vilius Sutkus '89 Date: Thu, 20 Jun 2024 14:15:13 +0300 Subject: [PATCH 09/27] Rename package_version to package_reference --- .github/workflows/build.yml | 4 ++-- scripts/list_package_versions.py | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 98a8597..f509bce 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -41,7 +41,7 @@ jobs: build: runs-on: ${{ matrix.config.build_machine }} - name: ${{ matrix.package.package_version }} - ${{ matrix.config.host_profile }} + name: ${{ matrix.package.package_reference }} - ${{ matrix.config.host_profile }} needs: - find-all-packages strategy: @@ -110,7 +110,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:host ${{ matrix.config.host_profile }} + conan test $test_conanfile ${{ matrix.package.package_reference }} --build missing --profile:host ${{ matrix.config.host_profile }} - name: conan login if: github.ref == 'refs/heads/main' || github.event_name == 'workflow_dispatch' diff --git a/scripts/list_package_versions.py b/scripts/list_package_versions.py index b12bf86..e7bb916 100644 --- a/scripts/list_package_versions.py +++ b/scripts/list_package_versions.py @@ -41,7 +41,7 @@ def main(): if args.github: result = [ { - "package_version": f"{package}/{infos["version"]}", + "package_reference": f"{package}/{infos["version"]}", "package": package, "version": infos["version"], "conanfile": str( From 5d0d644982ff0978dae420972d0c9cd432986ffc Mon Sep 17 00:00:00 2001 From: Vilius Sutkus '89 Date: Thu, 20 Jun 2024 14:22:12 +0300 Subject: [PATCH 10/27] Add Android-21 and -23 conan profiles --- .../conan/profiles/android-21-armv7 | 35 +++++++++++++++++++ .../conan/profiles/android-21-armv8 | 35 +++++++++++++++++++ .../conan/profiles/android-21-x86 | 35 +++++++++++++++++++ .../conan/profiles/android-21-x86_64 | 35 +++++++++++++++++++ .../conan/profiles/android-23-armv7 | 35 +++++++++++++++++++ .../conan/profiles/android-23-armv8 | 35 +++++++++++++++++++ .../conan/profiles/android-23-x86 | 35 +++++++++++++++++++ .../conan/profiles/android-23-x86_64 | 35 +++++++++++++++++++ .../ubuntu-22.04/conan/profiles/android-armv8 | 15 -------- .../ubuntu-22.04/conan/profiles/default | 2 +- .github/workflows/build.yml | 4 +-- 11 files changed, 283 insertions(+), 18 deletions(-) create mode 100644 .github/config/ubuntu-22.04/conan/profiles/android-21-armv7 create mode 100644 .github/config/ubuntu-22.04/conan/profiles/android-21-armv8 create mode 100644 .github/config/ubuntu-22.04/conan/profiles/android-21-x86 create mode 100644 .github/config/ubuntu-22.04/conan/profiles/android-21-x86_64 create mode 100644 .github/config/ubuntu-22.04/conan/profiles/android-23-armv7 create mode 100644 .github/config/ubuntu-22.04/conan/profiles/android-23-armv8 create mode 100644 .github/config/ubuntu-22.04/conan/profiles/android-23-x86 create mode 100644 .github/config/ubuntu-22.04/conan/profiles/android-23-x86_64 delete mode 100644 .github/config/ubuntu-22.04/conan/profiles/android-armv8 diff --git a/.github/config/ubuntu-22.04/conan/profiles/android-21-armv7 b/.github/config/ubuntu-22.04/conan/profiles/android-21-armv7 new file mode 100644 index 0000000..137d4d9 --- /dev/null +++ b/.github/config/ubuntu-22.04/conan/profiles/android-21-armv7 @@ -0,0 +1,35 @@ +{% set android_home = os.getenv("ANDROID_HOME") %} +{% set ndk_version = "26.3.11579264" %} +{% set api_level = "21" %} +{% set arch = "armv7" %} + +[settings] +os=Android +os.api_level={{api_level}} +arch={{arch}} +build_type=RelWithDebInfo +compiler=clang +compiler.version=17 +compiler.cppstd=20 +compiler.libcxx=c++_static + +[conf] +tools.android:ndk_path={{android_home}}/ndk/{{ndk_version}} + +[buildenv] +# Cross compile toolchain evn vars are required to build +# libffi, libgettext, libiconv, libxml2 and other autotools packages for Android +# https://github.com/conan-io/conan/issues/16493 +AR={{android_home}}/ndk/{{ndk_version}}/toolchains/llvm/prebuilt/linux-x86_64/bin/llvm-ar +AS={{android_home}}/ndk/{{ndk_version}}/toolchains/llvm/prebuilt/linux-x86_64/bin/llvm-as +RANLIB={{android_home}}/ndk/{{ndk_version}}/toolchains/llvm/prebuilt/linux-x86_64/bin/llvm-ranlib +{% set cc = { + "armv7": "armv7a-linux-androideabi" + api_level + "-clang", + "armv8": "aarch64-linux-android" + api_level + "-clang", + "x86": "i686-linux-android" + api_level + "-clang", + "x86_64": "x86_64-linux-android" + api_level + "-clang", +}[arch] %} +CC={{android_home}}/ndk/{{ndk_version}}/toolchains/llvm/prebuilt/linux-x86_64/bin/{{cc}} +CXX={{android_home}}/ndk/{{ndk_version}}/toolchains/llvm/prebuilt/linux-x86_64/bin/{{cc}}++ +LD={{android_home}}/ndk/{{ndk_version}}/toolchains/llvm/prebuilt/linux-x86_64/bin/ld +STRIP={{android_home}}/ndk/{{ndk_version}}/toolchains/llvm/prebuilt/linux-x86_64/bin/llvm-strip diff --git a/.github/config/ubuntu-22.04/conan/profiles/android-21-armv8 b/.github/config/ubuntu-22.04/conan/profiles/android-21-armv8 new file mode 100644 index 0000000..8d61005 --- /dev/null +++ b/.github/config/ubuntu-22.04/conan/profiles/android-21-armv8 @@ -0,0 +1,35 @@ +{% set android_home = os.getenv("ANDROID_HOME") %} +{% set ndk_version = "26.3.11579264" %} +{% set api_level = "21" %} +{% set arch = "armv8" %} + +[settings] +os=Android +os.api_level={{api_level}} +arch={{arch}} +build_type=RelWithDebInfo +compiler=clang +compiler.version=17 +compiler.cppstd=20 +compiler.libcxx=c++_static + +[conf] +tools.android:ndk_path={{android_home}}/ndk/{{ndk_version}} + +[buildenv] +# Cross compile toolchain evn vars are required to build +# libffi, libgettext, libiconv, libxml2 and other autotools packages for Android +# https://github.com/conan-io/conan/issues/16493 +AR={{android_home}}/ndk/{{ndk_version}}/toolchains/llvm/prebuilt/linux-x86_64/bin/llvm-ar +AS={{android_home}}/ndk/{{ndk_version}}/toolchains/llvm/prebuilt/linux-x86_64/bin/llvm-as +RANLIB={{android_home}}/ndk/{{ndk_version}}/toolchains/llvm/prebuilt/linux-x86_64/bin/llvm-ranlib +{% set cc = { + "armv7": "armv7a-linux-androideabi" + api_level + "-clang", + "armv8": "aarch64-linux-android" + api_level + "-clang", + "x86": "i686-linux-android" + api_level + "-clang", + "x86_64": "x86_64-linux-android" + api_level + "-clang", +}[arch] %} +CC={{android_home}}/ndk/{{ndk_version}}/toolchains/llvm/prebuilt/linux-x86_64/bin/{{cc}} +CXX={{android_home}}/ndk/{{ndk_version}}/toolchains/llvm/prebuilt/linux-x86_64/bin/{{cc}}++ +LD={{android_home}}/ndk/{{ndk_version}}/toolchains/llvm/prebuilt/linux-x86_64/bin/ld +STRIP={{android_home}}/ndk/{{ndk_version}}/toolchains/llvm/prebuilt/linux-x86_64/bin/llvm-strip diff --git a/.github/config/ubuntu-22.04/conan/profiles/android-21-x86 b/.github/config/ubuntu-22.04/conan/profiles/android-21-x86 new file mode 100644 index 0000000..ca567b4 --- /dev/null +++ b/.github/config/ubuntu-22.04/conan/profiles/android-21-x86 @@ -0,0 +1,35 @@ +{% set android_home = os.getenv("ANDROID_HOME") %} +{% set ndk_version = "26.3.11579264" %} +{% set api_level = "21" %} +{% set arch = "x86" %} + +[settings] +os=Android +os.api_level={{api_level}} +arch={{arch}} +build_type=RelWithDebInfo +compiler=clang +compiler.version=17 +compiler.cppstd=20 +compiler.libcxx=c++_static + +[conf] +tools.android:ndk_path={{android_home}}/ndk/{{ndk_version}} + +[buildenv] +# Cross compile toolchain evn vars are required to build +# libffi, libgettext, libiconv, libxml2 and other autotools packages for Android +# https://github.com/conan-io/conan/issues/16493 +AR={{android_home}}/ndk/{{ndk_version}}/toolchains/llvm/prebuilt/linux-x86_64/bin/llvm-ar +AS={{android_home}}/ndk/{{ndk_version}}/toolchains/llvm/prebuilt/linux-x86_64/bin/llvm-as +RANLIB={{android_home}}/ndk/{{ndk_version}}/toolchains/llvm/prebuilt/linux-x86_64/bin/llvm-ranlib +{% set cc = { + "armv7": "armv7a-linux-androideabi" + api_level + "-clang", + "armv8": "aarch64-linux-android" + api_level + "-clang", + "x86": "i686-linux-android" + api_level + "-clang", + "x86_64": "x86_64-linux-android" + api_level + "-clang", +}[arch] %} +CC={{android_home}}/ndk/{{ndk_version}}/toolchains/llvm/prebuilt/linux-x86_64/bin/{{cc}} +CXX={{android_home}}/ndk/{{ndk_version}}/toolchains/llvm/prebuilt/linux-x86_64/bin/{{cc}}++ +LD={{android_home}}/ndk/{{ndk_version}}/toolchains/llvm/prebuilt/linux-x86_64/bin/ld +STRIP={{android_home}}/ndk/{{ndk_version}}/toolchains/llvm/prebuilt/linux-x86_64/bin/llvm-strip diff --git a/.github/config/ubuntu-22.04/conan/profiles/android-21-x86_64 b/.github/config/ubuntu-22.04/conan/profiles/android-21-x86_64 new file mode 100644 index 0000000..cf42ab4 --- /dev/null +++ b/.github/config/ubuntu-22.04/conan/profiles/android-21-x86_64 @@ -0,0 +1,35 @@ +{% set android_home = os.getenv("ANDROID_HOME") %} +{% set ndk_version = "26.3.11579264" %} +{% set api_level = "21" %} +{% set arch = "x86_64" %} + +[settings] +os=Android +os.api_level={{api_level}} +arch={{arch}} +build_type=RelWithDebInfo +compiler=clang +compiler.version=17 +compiler.cppstd=20 +compiler.libcxx=c++_static + +[conf] +tools.android:ndk_path={{android_home}}/ndk/{{ndk_version}} + +[buildenv] +# Cross compile toolchain evn vars are required to build +# libffi, libgettext, libiconv, libxml2 and other autotools packages for Android +# https://github.com/conan-io/conan/issues/16493 +AR={{android_home}}/ndk/{{ndk_version}}/toolchains/llvm/prebuilt/linux-x86_64/bin/llvm-ar +AS={{android_home}}/ndk/{{ndk_version}}/toolchains/llvm/prebuilt/linux-x86_64/bin/llvm-as +RANLIB={{android_home}}/ndk/{{ndk_version}}/toolchains/llvm/prebuilt/linux-x86_64/bin/llvm-ranlib +{% set cc = { + "armv7": "armv7a-linux-androideabi" + api_level + "-clang", + "armv8": "aarch64-linux-android" + api_level + "-clang", + "x86": "i686-linux-android" + api_level + "-clang", + "x86_64": "x86_64-linux-android" + api_level + "-clang", +}[arch] %} +CC={{android_home}}/ndk/{{ndk_version}}/toolchains/llvm/prebuilt/linux-x86_64/bin/{{cc}} +CXX={{android_home}}/ndk/{{ndk_version}}/toolchains/llvm/prebuilt/linux-x86_64/bin/{{cc}}++ +LD={{android_home}}/ndk/{{ndk_version}}/toolchains/llvm/prebuilt/linux-x86_64/bin/ld +STRIP={{android_home}}/ndk/{{ndk_version}}/toolchains/llvm/prebuilt/linux-x86_64/bin/llvm-strip diff --git a/.github/config/ubuntu-22.04/conan/profiles/android-23-armv7 b/.github/config/ubuntu-22.04/conan/profiles/android-23-armv7 new file mode 100644 index 0000000..f2516e6 --- /dev/null +++ b/.github/config/ubuntu-22.04/conan/profiles/android-23-armv7 @@ -0,0 +1,35 @@ +{% set android_home = os.getenv("ANDROID_HOME") %} +{% set ndk_version = "26.3.11579264" %} +{% set api_level = "23" %} +{% set arch = "armv7" %} + +[settings] +os=Android +os.api_level={{api_level}} +arch={{arch}} +build_type=RelWithDebInfo +compiler=clang +compiler.version=17 +compiler.cppstd=20 +compiler.libcxx=c++_static + +[conf] +tools.android:ndk_path={{android_home}}/ndk/{{ndk_version}} + +[buildenv] +# Cross compile toolchain evn vars are required to build +# libffi, libgettext, libiconv, libxml2 and other autotools packages for Android +# https://github.com/conan-io/conan/issues/16493 +AR={{android_home}}/ndk/{{ndk_version}}/toolchains/llvm/prebuilt/linux-x86_64/bin/llvm-ar +AS={{android_home}}/ndk/{{ndk_version}}/toolchains/llvm/prebuilt/linux-x86_64/bin/llvm-as +RANLIB={{android_home}}/ndk/{{ndk_version}}/toolchains/llvm/prebuilt/linux-x86_64/bin/llvm-ranlib +{% set cc = { + "armv7": "armv7a-linux-androideabi" + api_level + "-clang", + "armv8": "aarch64-linux-android" + api_level + "-clang", + "x86": "i686-linux-android" + api_level + "-clang", + "x86_64": "x86_64-linux-android" + api_level + "-clang", +}[arch] %} +CC={{android_home}}/ndk/{{ndk_version}}/toolchains/llvm/prebuilt/linux-x86_64/bin/{{cc}} +CXX={{android_home}}/ndk/{{ndk_version}}/toolchains/llvm/prebuilt/linux-x86_64/bin/{{cc}}++ +LD={{android_home}}/ndk/{{ndk_version}}/toolchains/llvm/prebuilt/linux-x86_64/bin/ld +STRIP={{android_home}}/ndk/{{ndk_version}}/toolchains/llvm/prebuilt/linux-x86_64/bin/llvm-strip diff --git a/.github/config/ubuntu-22.04/conan/profiles/android-23-armv8 b/.github/config/ubuntu-22.04/conan/profiles/android-23-armv8 new file mode 100644 index 0000000..ac6edae --- /dev/null +++ b/.github/config/ubuntu-22.04/conan/profiles/android-23-armv8 @@ -0,0 +1,35 @@ +{% set android_home = os.getenv("ANDROID_HOME") %} +{% set ndk_version = "26.3.11579264" %} +{% set api_level = "23" %} +{% set arch = "armv8" %} + +[settings] +os=Android +os.api_level={{api_level}} +arch={{arch}} +build_type=RelWithDebInfo +compiler=clang +compiler.version=17 +compiler.cppstd=20 +compiler.libcxx=c++_static + +[conf] +tools.android:ndk_path={{android_home}}/ndk/{{ndk_version}} + +[buildenv] +# Cross compile toolchain evn vars are required to build +# libffi, libgettext, libiconv, libxml2 and other autotools packages for Android +# https://github.com/conan-io/conan/issues/16493 +AR={{android_home}}/ndk/{{ndk_version}}/toolchains/llvm/prebuilt/linux-x86_64/bin/llvm-ar +AS={{android_home}}/ndk/{{ndk_version}}/toolchains/llvm/prebuilt/linux-x86_64/bin/llvm-as +RANLIB={{android_home}}/ndk/{{ndk_version}}/toolchains/llvm/prebuilt/linux-x86_64/bin/llvm-ranlib +{% set cc = { + "armv7": "armv7a-linux-androideabi" + api_level + "-clang", + "armv8": "aarch64-linux-android" + api_level + "-clang", + "x86": "i686-linux-android" + api_level + "-clang", + "x86_64": "x86_64-linux-android" + api_level + "-clang", +}[arch] %} +CC={{android_home}}/ndk/{{ndk_version}}/toolchains/llvm/prebuilt/linux-x86_64/bin/{{cc}} +CXX={{android_home}}/ndk/{{ndk_version}}/toolchains/llvm/prebuilt/linux-x86_64/bin/{{cc}}++ +LD={{android_home}}/ndk/{{ndk_version}}/toolchains/llvm/prebuilt/linux-x86_64/bin/ld +STRIP={{android_home}}/ndk/{{ndk_version}}/toolchains/llvm/prebuilt/linux-x86_64/bin/llvm-strip diff --git a/.github/config/ubuntu-22.04/conan/profiles/android-23-x86 b/.github/config/ubuntu-22.04/conan/profiles/android-23-x86 new file mode 100644 index 0000000..b4c4f2f --- /dev/null +++ b/.github/config/ubuntu-22.04/conan/profiles/android-23-x86 @@ -0,0 +1,35 @@ +{% set android_home = os.getenv("ANDROID_HOME") %} +{% set ndk_version = "26.3.11579264" %} +{% set api_level = "23" %} +{% set arch = "x86" %} + +[settings] +os=Android +os.api_level={{api_level}} +arch={{arch}} +build_type=RelWithDebInfo +compiler=clang +compiler.version=17 +compiler.cppstd=20 +compiler.libcxx=c++_static + +[conf] +tools.android:ndk_path={{android_home}}/ndk/{{ndk_version}} + +[buildenv] +# Cross compile toolchain evn vars are required to build +# libffi, libgettext, libiconv, libxml2 and other autotools packages for Android +# https://github.com/conan-io/conan/issues/16493 +AR={{android_home}}/ndk/{{ndk_version}}/toolchains/llvm/prebuilt/linux-x86_64/bin/llvm-ar +AS={{android_home}}/ndk/{{ndk_version}}/toolchains/llvm/prebuilt/linux-x86_64/bin/llvm-as +RANLIB={{android_home}}/ndk/{{ndk_version}}/toolchains/llvm/prebuilt/linux-x86_64/bin/llvm-ranlib +{% set cc = { + "armv7": "armv7a-linux-androideabi" + api_level + "-clang", + "armv8": "aarch64-linux-android" + api_level + "-clang", + "x86": "i686-linux-android" + api_level + "-clang", + "x86_64": "x86_64-linux-android" + api_level + "-clang", +}[arch] %} +CC={{android_home}}/ndk/{{ndk_version}}/toolchains/llvm/prebuilt/linux-x86_64/bin/{{cc}} +CXX={{android_home}}/ndk/{{ndk_version}}/toolchains/llvm/prebuilt/linux-x86_64/bin/{{cc}}++ +LD={{android_home}}/ndk/{{ndk_version}}/toolchains/llvm/prebuilt/linux-x86_64/bin/ld +STRIP={{android_home}}/ndk/{{ndk_version}}/toolchains/llvm/prebuilt/linux-x86_64/bin/llvm-strip diff --git a/.github/config/ubuntu-22.04/conan/profiles/android-23-x86_64 b/.github/config/ubuntu-22.04/conan/profiles/android-23-x86_64 new file mode 100644 index 0000000..19d8260 --- /dev/null +++ b/.github/config/ubuntu-22.04/conan/profiles/android-23-x86_64 @@ -0,0 +1,35 @@ +{% set android_home = os.getenv("ANDROID_HOME") %} +{% set ndk_version = "26.3.11579264" %} +{% set api_level = "23" %} +{% set arch = "x86_64" %} + +[settings] +os=Android +os.api_level={{api_level}} +arch={{arch}} +build_type=RelWithDebInfo +compiler=clang +compiler.version=17 +compiler.cppstd=20 +compiler.libcxx=c++_static + +[conf] +tools.android:ndk_path={{android_home}}/ndk/{{ndk_version}} + +[buildenv] +# Cross compile toolchain evn vars are required to build +# libffi, libgettext, libiconv, libxml2 and other autotools packages for Android +# https://github.com/conan-io/conan/issues/16493 +AR={{android_home}}/ndk/{{ndk_version}}/toolchains/llvm/prebuilt/linux-x86_64/bin/llvm-ar +AS={{android_home}}/ndk/{{ndk_version}}/toolchains/llvm/prebuilt/linux-x86_64/bin/llvm-as +RANLIB={{android_home}}/ndk/{{ndk_version}}/toolchains/llvm/prebuilt/linux-x86_64/bin/llvm-ranlib +{% set cc = { + "armv7": "armv7a-linux-androideabi" + api_level + "-clang", + "armv8": "aarch64-linux-android" + api_level + "-clang", + "x86": "i686-linux-android" + api_level + "-clang", + "x86_64": "x86_64-linux-android" + api_level + "-clang", +}[arch] %} +CC={{android_home}}/ndk/{{ndk_version}}/toolchains/llvm/prebuilt/linux-x86_64/bin/{{cc}} +CXX={{android_home}}/ndk/{{ndk_version}}/toolchains/llvm/prebuilt/linux-x86_64/bin/{{cc}}++ +LD={{android_home}}/ndk/{{ndk_version}}/toolchains/llvm/prebuilt/linux-x86_64/bin/ld +STRIP={{android_home}}/ndk/{{ndk_version}}/toolchains/llvm/prebuilt/linux-x86_64/bin/llvm-strip diff --git a/.github/config/ubuntu-22.04/conan/profiles/android-armv8 b/.github/config/ubuntu-22.04/conan/profiles/android-armv8 deleted file mode 100644 index 759d6f5..0000000 --- a/.github/config/ubuntu-22.04/conan/profiles/android-armv8 +++ /dev/null @@ -1,15 +0,0 @@ -{% set android_home = os.getenv("ANDROID_HOME") %} -{% set ndk_version = "26.3.11579264" %} - -[settings] -os=Android -os.api_level=23 -arch=armv8 -build_type=RelWithDebInfo -compiler=clang -compiler.version=17 -compiler.cppstd=20 -compiler.libcxx=c++_static - -[conf] -tools.android:ndk_path={{android_home}}/ndk/{{ndk_version}} diff --git a/.github/config/ubuntu-22.04/conan/profiles/default b/.github/config/ubuntu-22.04/conan/profiles/default index 0787ebb..60b8cfe 100644 --- a/.github/config/ubuntu-22.04/conan/profiles/default +++ b/.github/config/ubuntu-22.04/conan/profiles/default @@ -4,7 +4,7 @@ arch=x86_64 build_type=RelWithDebInfo compiler=clang compiler.version=15 -compiler.cppstd=17 +compiler.cppstd=20 compiler.libcxx=libstdc++11 [conf] diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index f509bce..e5c2feb 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -50,11 +50,11 @@ jobs: package: ${{ fromJson(needs.find-all-packages.outputs.packages) }} config: - { build_machine: ubuntu-22.04, host_profile: ubuntu } - - { build_machine: ubuntu-22.04, host_profile: android-armv8, ndk_version: 26.3.11579264 } + - { build_machine: ubuntu-22.04, host_profile: android-23-armv8, ndk_version: 26.3.11579264 } # Known not working build configurations exclude: - package: { "package_version": "odrcore/1.0.0", "package": "odrcore", "version": "1.0.0", "conanfile": "recipes/odrcore/all/conanfile.py" } - config: { build_machine: ubuntu-22.04, host_profile: android-armv8, ndk_version: 26.3.11579264 } + config: { build_machine: ubuntu-22.04, host_profile: android-23-armv8, ndk_version: 26.3.11579264 } steps: - name: checkout uses: actions/checkout@v4 From 7020959a83f5bdcf11b520791c19eab79c6ba21b Mon Sep 17 00:00:00 2001 From: Vilius Sutkus '89 Date: Thu, 20 Jun 2024 14:24:46 +0300 Subject: [PATCH 11/27] List (and build in CI) newer versions first --- scripts/list_package_versions.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/list_package_versions.py b/scripts/list_package_versions.py index e7bb916..6f74287 100644 --- a/scripts/list_package_versions.py +++ b/scripts/list_package_versions.py @@ -49,7 +49,7 @@ def main(): ), } for package in sorted(package_infos.keys()) - for infos in sorted(package_infos[package], key=lambda x: x["version"]) + for infos in sorted(package_infos[package], key=lambda x: x["version"], reverse=True) ] print("packages=" + json.dumps(result)) From 92d69786f49fe3e8922a50f411ed7d52ad110c96 Mon Sep 17 00:00:00 2001 From: Vilius Sutkus '89 Date: Thu, 20 Jun 2024 14:34:55 +0300 Subject: [PATCH 12/27] [2/2] Rename package_version to package_reference --- .github/workflows/build.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index e5c2feb..a120e63 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -53,7 +53,7 @@ jobs: - { build_machine: ubuntu-22.04, host_profile: android-23-armv8, ndk_version: 26.3.11579264 } # Known not working build configurations exclude: - - package: { "package_version": "odrcore/1.0.0", "package": "odrcore", "version": "1.0.0", "conanfile": "recipes/odrcore/all/conanfile.py" } + - package: { "package_reference": "odrcore/1.0.0", "package": "odrcore", "version": "1.0.0", "conanfile": "recipes/odrcore/all/conanfile.py" } config: { build_machine: ubuntu-22.04, host_profile: android-23-armv8, ndk_version: 26.3.11579264 } steps: - name: checkout From 5dc5afc126f818b2abec41f7ddcf554abc277758 Mon Sep 17 00:00:00 2001 From: Vilius Sutkus '89 Date: Thu, 20 Jun 2024 14:35:48 +0300 Subject: [PATCH 13/27] Add deep test workflow --- .github/workflows/deep-test.yml | 106 ++++++++++++++++++++++++++++++++ 1 file changed, 106 insertions(+) create mode 100644 .github/workflows/deep-test.yml diff --git a/.github/workflows/deep-test.yml b/.github/workflows/deep-test.yml new file mode 100644 index 0000000..1fb2be1 --- /dev/null +++ b/.github/workflows/deep-test.yml @@ -0,0 +1,106 @@ +name: deep test + +on: push + +concurrency: + group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }} + cancel-in-progress: true + +jobs: + find-all-packages: + # Deep testing limited to personal fork + if: ${{ github.repository_owner }} == "ViliusSutkus89" + runs-on: ubuntu-22.04 + outputs: + packages: ${{ steps.list-packages.outputs.packages }} + steps: + - name: checkout + uses: actions/checkout@v4 + + - name: setup python 3.12 + uses: actions/setup-python@v5 + with: + python-version: 3.12 + - name: install python dependencies + run: pip install --upgrade pip pyyaml + + - name: List all packages + run: python scripts/list_package_versions.py + + - name: List all packages in GitHub Actions format + id: list-packages + run: python scripts/list_package_versions.py --github | tee $GITHUB_OUTPUT + + build: + runs-on: ${{ matrix.config.build_machine }} + name: ${{ matrix.package.package_reference }} - ${{ matrix.config.host_profile }} + needs: + - find-all-packages + strategy: + fail-fast: false + matrix: + package: ${{ fromJson(needs.find-all-packages.outputs.packages) }} + config: + - { build_machine: ubuntu-22.04, host_profile: android-23-armv7, ndk_version: 26.3.11579264 } + - { build_machine: ubuntu-22.04, host_profile: android-23-x86, ndk_version: 26.3.11579264 } + - { build_machine: ubuntu-22.04, host_profile: android-23-x86_64, ndk_version: 26.3.11579264 } + - { build_machine: ubuntu-22.04, host_profile: android-21-armv8, ndk_version: 26.3.11579264 } + - { build_machine: ubuntu-22.04, host_profile: android-21-armv7, ndk_version: 26.3.11579264 } + - { build_machine: ubuntu-22.04, host_profile: android-21-x86, ndk_version: 26.3.11579264 } + - { build_machine: ubuntu-22.04, host_profile: android-21-x86_64, ndk_version: 26.3.11579264 } + # Known not working build configurations + exclude: + - package: { "package_reference": "odrcore/1.0.0", "package": "odrcore", "version": "1.0.0", "conanfile": "recipes/odrcore/all/conanfile.py" } + config: { build_machine: ubuntu-22.04, host_profile: android-23-armv7, ndk_version: 26.3.11579264 } + - package: { "package_reference": "odrcore/1.0.0", "package": "odrcore", "version": "1.0.0", "conanfile": "recipes/odrcore/all/conanfile.py" } + config: { build_machine: ubuntu-22.04, host_profile: android-23-x86, ndk_version: 26.3.11579264 } + - package: { "package_reference": "odrcore/1.0.0", "package": "odrcore", "version": "1.0.0", "conanfile": "recipes/odrcore/all/conanfile.py" } + config: { build_machine: ubuntu-22.04, host_profile: android-23-x86_64, ndk_version: 26.3.11579264 } + - package: { "package_reference": "odrcore/1.0.0", "package": "odrcore", "version": "1.0.0", "conanfile": "recipes/odrcore/all/conanfile.py" } + config: { build_machine: ubuntu-22.04, host_profile: android-21-armv8, ndk_version: 26.3.11579264 } + - package: { "package_reference": "odrcore/1.0.0", "package": "odrcore", "version": "1.0.0", "conanfile": "recipes/odrcore/all/conanfile.py" } + config: { build_machine: ubuntu-22.04, host_profile: android-21-armv7, ndk_version: 26.3.11579264 } + - package: { "package_reference": "odrcore/1.0.0", "package": "odrcore", "version": "1.0.0", "conanfile": "recipes/odrcore/all/conanfile.py" } + config: { build_machine: ubuntu-22.04, host_profile: android-21-x86, ndk_version: 26.3.11579264 } + - package: { "package_reference": "odrcore/1.0.0", "package": "odrcore", "version": "1.0.0", "conanfile": "recipes/odrcore/all/conanfile.py" } + config: { build_machine: ubuntu-22.04, host_profile: android-21-x86_64, ndk_version: 26.3.11579264 } + steps: + - name: checkout + uses: actions/checkout@v4 + + - name: setup python 3.12 + uses: actions/setup-python@v5 + with: + python-version: 3.12 + - name: install python dependencies + run: pip install --upgrade pip conan setuptools + + - name: install NDK + if: startsWith(matrix.config.host_profile, 'android') + run: echo "y" | sudo ${ANDROID_HOME}/cmdline-tools/latest/bin/sdkmanager --install "ndk;${{ matrix.config.ndk_version }}" + + - name: conan remote + run: conan remote add --index 0 odr https://artifactory.opendocument.app/artifactory/api/conan/conan + - name: conan config + run: conan config install .github/config/${{ matrix.config.build_machine }}/conan + + # Multiple unpublished packages in this repo have inter-dependencies + # Can't build them until the deps are published to artifactory or at least exported + - name: Conan export all packages + run: python scripts/conan_export_all_packages.py + + - name: conan install + run: conan install ${{ matrix.package.conanfile }} --version ${{ matrix.package.version }} --build missing --profile:host ${{ matrix.config.host_profile }} + - 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:host ${{ matrix.config.host_profile }} + - name: conan export + run: conan export ${{ matrix.package.conanfile }} --version ${{ matrix.package.version }} + - name: conan export-pkg + run: conan export-pkg ${{ matrix.package.conanfile }} --version ${{ matrix.package.version }} --profile:host ${{ matrix.config.host_profile }} + + - name: conan test + run: | + test_conanfile=$(dirname ${{ matrix.package.conanfile }})/test_package/conanfile.py + conan test $test_conanfile ${{ matrix.package.package_reference }} --build missing --profile:host ${{ matrix.config.host_profile }} From 6175876e4ce24c690d773475b28ef65ff4420741 Mon Sep 17 00:00:00 2001 From: Vilius Sutkus '89 Date: Thu, 20 Jun 2024 14:39:53 +0300 Subject: [PATCH 14/27] Disable package exporter call in deep-test --- .github/workflows/deep-test.yml | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/.github/workflows/deep-test.yml b/.github/workflows/deep-test.yml index 1fb2be1..364f0fd 100644 --- a/.github/workflows/deep-test.yml +++ b/.github/workflows/deep-test.yml @@ -84,11 +84,10 @@ jobs: - name: conan config run: conan config install .github/config/${{ matrix.config.build_machine }}/conan - # Multiple unpublished packages in this repo have inter-dependencies - # Can't build them until the deps are published to artifactory or at least exported - - name: Conan export all packages - run: python scripts/conan_export_all_packages.py - +# # Multiple unpublished packages in this repo have inter-dependencies +# # Can't build them until the deps are published to artifactory or at least exported +# - name: Conan export all packages +# run: python scripts/conan_export_all_packages.py - name: conan install run: conan install ${{ matrix.package.conanfile }} --version ${{ matrix.package.version }} --build missing --profile:host ${{ matrix.config.host_profile }} - name: conan source From 71d866975ce12d6a35fd4c134d3190b5e8b7fd35 Mon Sep 17 00:00:00 2001 From: Vilius Sutkus '89 Date: Thu, 20 Jun 2024 15:19:03 +0300 Subject: [PATCH 15/27] Update deep test filter --- .github/workflows/deep-test.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/deep-test.yml b/.github/workflows/deep-test.yml index 364f0fd..6bc199a 100644 --- a/.github/workflows/deep-test.yml +++ b/.github/workflows/deep-test.yml @@ -9,7 +9,7 @@ concurrency: jobs: find-all-packages: # Deep testing limited to personal fork - if: ${{ github.repository_owner }} == "ViliusSutkus89" + if: ${{ github.repository_owner == 'ViliusSutkus89' }} runs-on: ubuntu-22.04 outputs: packages: ${{ steps.list-packages.outputs.packages }} From e0495be987dd248716c7611f483c49acb8991c11 Mon Sep 17 00:00:00 2001 From: Vilius Sutkus '89 Date: Mon, 24 Jun 2024 20:46:12 +0300 Subject: [PATCH 16/27] Export all conan recipes to local cache --- .github/workflows/build.yml | 4 ++++ .github/workflows/deep-test.yml | 8 ++++---- scripts/conan_export_all_packages.py | 17 +++++++++++++++++ scripts/list_package_versions.py | 18 +++++++++++------- 4 files changed, 36 insertions(+), 11 deletions(-) create mode 100644 scripts/conan_export_all_packages.py diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index a120e63..57f02ed 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -86,6 +86,10 @@ jobs: - name: conan config run: conan config install .github/config/${{ matrix.config.build_machine }}/conan + # Export all recipes to local conan cache, to make sure all changes in all dependencies are picked up + - name: Conan export all packages + run: python scripts/conan_export_all_packages.py + - name: cache uses: actions/cache@v4 with: diff --git a/.github/workflows/deep-test.yml b/.github/workflows/deep-test.yml index 6bc199a..23f1dae 100644 --- a/.github/workflows/deep-test.yml +++ b/.github/workflows/deep-test.yml @@ -84,10 +84,10 @@ jobs: - name: conan config run: conan config install .github/config/${{ matrix.config.build_machine }}/conan -# # Multiple unpublished packages in this repo have inter-dependencies -# # Can't build them until the deps are published to artifactory or at least exported -# - name: Conan export all packages -# run: python scripts/conan_export_all_packages.py + # Export all recipes to local conan cache, to make sure all changes in all dependencies are picked up + - name: Conan export all packages + run: python scripts/conan_export_all_packages.py + - name: conan install run: conan install ${{ matrix.package.conanfile }} --version ${{ matrix.package.version }} --build missing --profile:host ${{ matrix.config.host_profile }} - name: conan source diff --git a/scripts/conan_export_all_packages.py b/scripts/conan_export_all_packages.py new file mode 100644 index 0000000..9814540 --- /dev/null +++ b/scripts/conan_export_all_packages.py @@ -0,0 +1,17 @@ +#!/usr/bin/env python3 +import os +import subprocess + +from list_package_versions import get_package_infos + + +def main(): + package_infos = get_package_infos() + for package in package_infos: + for version in package_infos[package]: + conanfile = os.path.join("recipes", package, version["folder"], "conanfile.py") + subprocess.run(["conan", "export", conanfile, "--version", version["version"]]) + + +if __name__ == "__main__": + main() diff --git a/scripts/list_package_versions.py b/scripts/list_package_versions.py index 6f74287..5f7243d 100644 --- a/scripts/list_package_versions.py +++ b/scripts/list_package_versions.py @@ -6,13 +6,7 @@ import json -def main(): - parser = argparse.ArgumentParser(description="List package versions") - parser.add_argument( - "--github", help="Format output for GitHub Actions", action="store_true" - ) - args = parser.parse_args() - +def get_package_infos(): script_path = Path(__file__).resolve().parent root_path = script_path.parent recipes_path = root_path / "recipes" @@ -38,6 +32,16 @@ def main(): package_infos[recipe_path.name] = infos + return package_infos + + +def main(): + package_infos = get_package_infos() + parser = argparse.ArgumentParser(description="List package versions") + parser.add_argument( + "--github", help="Format output for GitHub Actions", action="store_true" + ) + args = parser.parse_args() if args.github: result = [ { From 96075e54f6c893a19811d62bb265f632b3eb709d Mon Sep 17 00:00:00 2001 From: Vilius Sutkus '89 Date: Mon, 24 Jun 2024 20:47:06 +0300 Subject: [PATCH 17/27] Trigger build pipeline on generic push (this should also cover on PR) --- .github/workflows/build.yml | 3 --- 1 file changed, 3 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 57f02ed..89e3c3d 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -3,9 +3,6 @@ name: build_test on: workflow_dispatch: push: - branches: - - main - pull_request: concurrency: group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }} From 74e2ad76877cfe5e81e2f6449d0626fc1969bbb5 Mon Sep 17 00:00:00 2001 From: Vilius Sutkus '89 Date: Mon, 24 Jun 2024 20:51:33 +0300 Subject: [PATCH 18/27] [2/2] Trigger build pipeline on generic push (this should also cover on PR) --- .github/workflows/build.yml | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 89e3c3d..fac0ecc 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -1,8 +1,6 @@ name: build_test -on: - workflow_dispatch: - push: +on: push concurrency: group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }} From 3c5a3a341ba745e25f0571668d91208bb07bc6eb Mon Sep 17 00:00:00 2001 From: Vilius Sutkus '89 Date: Mon, 24 Jun 2024 20:54:59 +0300 Subject: [PATCH 19/27] Disable ccache in CI. Build will not fit anyways --- .github/workflows/build.yml | 28 +--------------------------- 1 file changed, 1 insertion(+), 27 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index fac0ecc..5b13850 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -6,11 +6,6 @@ concurrency: group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }} cancel-in-progress: true -env: - CCACHE_DIR: ${{ github.workspace }}/ccache - CCACHE_MAXSIZE: 500M - CCACHE_KEY_SUFFIX: r1 - jobs: find-all-packages: runs-on: ubuntu-22.04 @@ -29,7 +24,7 @@ jobs: - name: List all packages run: python scripts/list_package_versions.py - + - name: List all packages in GitHub Actions format id: list-packages run: python scripts/list_package_versions.py --github | tee $GITHUB_OUTPUT @@ -54,17 +49,6 @@ jobs: - name: checkout uses: actions/checkout@v4 - - name: ubuntu install ccache - if: runner.os == 'Linux' - run: | - sudo apt install ccache - ccache -V - - name: macos install ccache - if: runner.os == 'macOS' - run: | - brew install ccache - ccache -V - - name: setup python 3.12 uses: actions/setup-python@v5 with: @@ -85,16 +69,6 @@ jobs: - name: Conan export all packages run: python scripts/conan_export_all_packages.py - - name: cache - uses: actions/cache@v4 - with: - path: | - ~/.ccache - /Users/runner/Library/Caches/ccache - key: ${{ matrix.config.build_machine }}-${{ matrix.config.host_profile }}-${{ env.CCACHE_KEY_SUFFIX }} - restore-keys: | - ${{ matrix.config.build_machine }}-${{ matrix.config.host_profile }}- - - name: conan install run: conan install ${{ matrix.package.conanfile }} --version ${{ matrix.package.version }} --build missing --profile:host ${{ matrix.config.host_profile }} - name: conan source From 1f949b9af5ff0a2eb10d60a47f6cdf97dea985b4 Mon Sep 17 00:00:00 2001 From: Vilius Sutkus '89 Date: Mon, 24 Jun 2024 20:58:33 +0300 Subject: [PATCH 20/27] Merge deep-test into build pipeline --- .github/workflows/build.yml | 22 +++++++ .github/workflows/deep-test.yml | 105 -------------------------------- 2 files changed, 22 insertions(+), 105 deletions(-) delete mode 100644 .github/workflows/deep-test.yml diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 5b13850..5413d3c 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -41,10 +41,32 @@ jobs: config: - { build_machine: ubuntu-22.04, host_profile: ubuntu } - { build_machine: ubuntu-22.04, host_profile: android-23-armv8, ndk_version: 26.3.11579264 } + - { build_machine: ubuntu-22.04, host_profile: android-23-armv7, ndk_version: 26.3.11579264 } + - { build_machine: ubuntu-22.04, host_profile: android-23-x86, ndk_version: 26.3.11579264 } + - { build_machine: ubuntu-22.04, host_profile: android-23-x86_64, ndk_version: 26.3.11579264 } + - { build_machine: ubuntu-22.04, host_profile: android-21-armv8, ndk_version: 26.3.11579264 } + - { build_machine: ubuntu-22.04, host_profile: android-21-armv7, ndk_version: 26.3.11579264 } + - { build_machine: ubuntu-22.04, host_profile: android-21-x86, ndk_version: 26.3.11579264 } + - { build_machine: ubuntu-22.04, host_profile: android-21-x86_64, ndk_version: 26.3.11579264 } # Known not working build configurations + # Would be cool to actually solve odrcore/1.0.0 for Android exclude: - package: { "package_reference": "odrcore/1.0.0", "package": "odrcore", "version": "1.0.0", "conanfile": "recipes/odrcore/all/conanfile.py" } config: { build_machine: ubuntu-22.04, host_profile: android-23-armv8, ndk_version: 26.3.11579264 } + - package: { "package_reference": "odrcore/1.0.0", "package": "odrcore", "version": "1.0.0", "conanfile": "recipes/odrcore/all/conanfile.py" } + config: { build_machine: ubuntu-22.04, host_profile: android-23-armv7, ndk_version: 26.3.11579264 } + - package: { "package_reference": "odrcore/1.0.0", "package": "odrcore", "version": "1.0.0", "conanfile": "recipes/odrcore/all/conanfile.py" } + config: { build_machine: ubuntu-22.04, host_profile: android-23-x86, ndk_version: 26.3.11579264 } + - package: { "package_reference": "odrcore/1.0.0", "package": "odrcore", "version": "1.0.0", "conanfile": "recipes/odrcore/all/conanfile.py" } + config: { build_machine: ubuntu-22.04, host_profile: android-23-x86_64, ndk_version: 26.3.11579264 } + - package: { "package_reference": "odrcore/1.0.0", "package": "odrcore", "version": "1.0.0", "conanfile": "recipes/odrcore/all/conanfile.py" } + config: { build_machine: ubuntu-22.04, host_profile: android-21-armv8, ndk_version: 26.3.11579264 } + - package: { "package_reference": "odrcore/1.0.0", "package": "odrcore", "version": "1.0.0", "conanfile": "recipes/odrcore/all/conanfile.py" } + config: { build_machine: ubuntu-22.04, host_profile: android-21-armv7, ndk_version: 26.3.11579264 } + - package: { "package_reference": "odrcore/1.0.0", "package": "odrcore", "version": "1.0.0", "conanfile": "recipes/odrcore/all/conanfile.py" } + config: { build_machine: ubuntu-22.04, host_profile: android-21-x86, ndk_version: 26.3.11579264 } + - package: { "package_reference": "odrcore/1.0.0", "package": "odrcore", "version": "1.0.0", "conanfile": "recipes/odrcore/all/conanfile.py" } + config: { build_machine: ubuntu-22.04, host_profile: android-21-x86_64, ndk_version: 26.3.11579264 } steps: - name: checkout uses: actions/checkout@v4 diff --git a/.github/workflows/deep-test.yml b/.github/workflows/deep-test.yml deleted file mode 100644 index 23f1dae..0000000 --- a/.github/workflows/deep-test.yml +++ /dev/null @@ -1,105 +0,0 @@ -name: deep test - -on: push - -concurrency: - group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }} - cancel-in-progress: true - -jobs: - find-all-packages: - # Deep testing limited to personal fork - if: ${{ github.repository_owner == 'ViliusSutkus89' }} - runs-on: ubuntu-22.04 - outputs: - packages: ${{ steps.list-packages.outputs.packages }} - steps: - - name: checkout - uses: actions/checkout@v4 - - - name: setup python 3.12 - uses: actions/setup-python@v5 - with: - python-version: 3.12 - - name: install python dependencies - run: pip install --upgrade pip pyyaml - - - name: List all packages - run: python scripts/list_package_versions.py - - - name: List all packages in GitHub Actions format - id: list-packages - run: python scripts/list_package_versions.py --github | tee $GITHUB_OUTPUT - - build: - runs-on: ${{ matrix.config.build_machine }} - name: ${{ matrix.package.package_reference }} - ${{ matrix.config.host_profile }} - needs: - - find-all-packages - strategy: - fail-fast: false - matrix: - package: ${{ fromJson(needs.find-all-packages.outputs.packages) }} - config: - - { build_machine: ubuntu-22.04, host_profile: android-23-armv7, ndk_version: 26.3.11579264 } - - { build_machine: ubuntu-22.04, host_profile: android-23-x86, ndk_version: 26.3.11579264 } - - { build_machine: ubuntu-22.04, host_profile: android-23-x86_64, ndk_version: 26.3.11579264 } - - { build_machine: ubuntu-22.04, host_profile: android-21-armv8, ndk_version: 26.3.11579264 } - - { build_machine: ubuntu-22.04, host_profile: android-21-armv7, ndk_version: 26.3.11579264 } - - { build_machine: ubuntu-22.04, host_profile: android-21-x86, ndk_version: 26.3.11579264 } - - { build_machine: ubuntu-22.04, host_profile: android-21-x86_64, ndk_version: 26.3.11579264 } - # Known not working build configurations - exclude: - - package: { "package_reference": "odrcore/1.0.0", "package": "odrcore", "version": "1.0.0", "conanfile": "recipes/odrcore/all/conanfile.py" } - config: { build_machine: ubuntu-22.04, host_profile: android-23-armv7, ndk_version: 26.3.11579264 } - - package: { "package_reference": "odrcore/1.0.0", "package": "odrcore", "version": "1.0.0", "conanfile": "recipes/odrcore/all/conanfile.py" } - config: { build_machine: ubuntu-22.04, host_profile: android-23-x86, ndk_version: 26.3.11579264 } - - package: { "package_reference": "odrcore/1.0.0", "package": "odrcore", "version": "1.0.0", "conanfile": "recipes/odrcore/all/conanfile.py" } - config: { build_machine: ubuntu-22.04, host_profile: android-23-x86_64, ndk_version: 26.3.11579264 } - - package: { "package_reference": "odrcore/1.0.0", "package": "odrcore", "version": "1.0.0", "conanfile": "recipes/odrcore/all/conanfile.py" } - config: { build_machine: ubuntu-22.04, host_profile: android-21-armv8, ndk_version: 26.3.11579264 } - - package: { "package_reference": "odrcore/1.0.0", "package": "odrcore", "version": "1.0.0", "conanfile": "recipes/odrcore/all/conanfile.py" } - config: { build_machine: ubuntu-22.04, host_profile: android-21-armv7, ndk_version: 26.3.11579264 } - - package: { "package_reference": "odrcore/1.0.0", "package": "odrcore", "version": "1.0.0", "conanfile": "recipes/odrcore/all/conanfile.py" } - config: { build_machine: ubuntu-22.04, host_profile: android-21-x86, ndk_version: 26.3.11579264 } - - package: { "package_reference": "odrcore/1.0.0", "package": "odrcore", "version": "1.0.0", "conanfile": "recipes/odrcore/all/conanfile.py" } - config: { build_machine: ubuntu-22.04, host_profile: android-21-x86_64, ndk_version: 26.3.11579264 } - steps: - - name: checkout - uses: actions/checkout@v4 - - - name: setup python 3.12 - uses: actions/setup-python@v5 - with: - python-version: 3.12 - - name: install python dependencies - run: pip install --upgrade pip conan setuptools - - - name: install NDK - if: startsWith(matrix.config.host_profile, 'android') - run: echo "y" | sudo ${ANDROID_HOME}/cmdline-tools/latest/bin/sdkmanager --install "ndk;${{ matrix.config.ndk_version }}" - - - name: conan remote - run: conan remote add --index 0 odr https://artifactory.opendocument.app/artifactory/api/conan/conan - - name: conan config - run: conan config install .github/config/${{ matrix.config.build_machine }}/conan - - # Export all recipes to local conan cache, to make sure all changes in all dependencies are picked up - - name: Conan export all packages - run: python scripts/conan_export_all_packages.py - - - name: conan install - run: conan install ${{ matrix.package.conanfile }} --version ${{ matrix.package.version }} --build missing --profile:host ${{ matrix.config.host_profile }} - - 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:host ${{ matrix.config.host_profile }} - - name: conan export - run: conan export ${{ matrix.package.conanfile }} --version ${{ matrix.package.version }} - - name: conan export-pkg - run: conan export-pkg ${{ matrix.package.conanfile }} --version ${{ matrix.package.version }} --profile:host ${{ matrix.config.host_profile }} - - - name: conan test - run: | - test_conanfile=$(dirname ${{ matrix.package.conanfile }})/test_package/conanfile.py - conan test $test_conanfile ${{ matrix.package.package_reference }} --build missing --profile:host ${{ matrix.config.host_profile }} From 2da8205a51038eb0e1904030401a1e087b39f1e4 Mon Sep 17 00:00:00 2001 From: Vilius Sutkus '89 Date: Mon, 24 Jun 2024 21:04:19 +0300 Subject: [PATCH 21/27] Use ubuntu build profile instead of relying on default build profile --- .github/workflows/build.yml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 5413d3c..c48e469 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -92,20 +92,20 @@ jobs: run: python scripts/conan_export_all_packages.py - name: conan install - run: conan install ${{ matrix.package.conanfile }} --version ${{ matrix.package.version }} --build missing --profile:host ${{ matrix.config.host_profile }} + run: conan install ${{ matrix.package.conanfile }} --version ${{ matrix.package.version }} --build missing --profile:host ${{ matrix.config.host_profile }} --profile:build ubuntu - 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:host ${{ matrix.config.host_profile }} + run: conan build ${{ matrix.package.conanfile }} --version ${{ matrix.package.version }} --profile:host ${{ matrix.config.host_profile }} --profile:build ubuntu - name: conan export run: conan export ${{ matrix.package.conanfile }} --version ${{ matrix.package.version }} - name: conan export-pkg - run: conan export-pkg ${{ matrix.package.conanfile }} --version ${{ matrix.package.version }} --profile:host ${{ matrix.config.host_profile }} + run: conan export-pkg ${{ matrix.package.conanfile }} --version ${{ matrix.package.version }} --profile:host ${{ matrix.config.host_profile }} --profile:build ubuntu - name: conan test run: | test_conanfile=$(dirname ${{ matrix.package.conanfile }})/test_package/conanfile.py - conan test $test_conanfile ${{ matrix.package.package_reference }} --build missing --profile:host ${{ matrix.config.host_profile }} + conan test $test_conanfile ${{ matrix.package.package_reference }} --build missing --profile:host ${{ matrix.config.host_profile }} --profile:build ubuntu - name: conan login if: github.ref == 'refs/heads/main' || github.event_name == 'workflow_dispatch' From 9db47be954a1c98e5c0ca329578e6db5cfab46e1 Mon Sep 17 00:00:00 2001 From: Vilius Sutkus '89 Date: Mon, 24 Jun 2024 21:05:26 +0300 Subject: [PATCH 22/27] Cache pip dependencies --- .github/workflows/build.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index c48e469..99348fd 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -19,6 +19,7 @@ jobs: uses: actions/setup-python@v5 with: python-version: 3.12 + cache: 'pip' - name: install python dependencies run: pip install --upgrade pip pyyaml @@ -75,6 +76,7 @@ jobs: uses: actions/setup-python@v5 with: python-version: 3.12 + cache: 'pip' - name: install python dependencies run: pip install --upgrade pip conan From befbf53a205016cdf6c59a8fd62431dd6c90a98f Mon Sep 17 00:00:00 2001 From: Vilius Sutkus '89 Date: Mon, 24 Jun 2024 21:13:03 +0300 Subject: [PATCH 23/27] Run build pipeline on workflow_dispatch too --- .github/workflows/build.yml | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 99348fd..be4b376 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -1,6 +1,8 @@ name: build_test -on: push +on: + workflow_dispatch: + push: concurrency: group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }} From cb0cf52aa2a328e1651f0659b73bbb84caf07b0d Mon Sep 17 00:00:00 2001 From: Vilius Sutkus '89 Date: Mon, 24 Jun 2024 21:29:05 +0300 Subject: [PATCH 24/27] Remove pip cache, turns out it's only for regular python projects with requirements.txt --- .github/workflows/build.yml | 2 -- 1 file changed, 2 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index be4b376..caee677 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -21,7 +21,6 @@ jobs: uses: actions/setup-python@v5 with: python-version: 3.12 - cache: 'pip' - name: install python dependencies run: pip install --upgrade pip pyyaml @@ -78,7 +77,6 @@ jobs: uses: actions/setup-python@v5 with: python-version: 3.12 - cache: 'pip' - name: install python dependencies run: pip install --upgrade pip conan From a39d79be7ea2962cd0e9ae3fe4fcb1f097be41c8 Mon Sep 17 00:00:00 2001 From: Vilius Sutkus '89 Date: Mon, 24 Jun 2024 21:35:04 +0300 Subject: [PATCH 25/27] Revert "Disable ccache in CI. Build will not fit anyways". I may have been wrong about ccache --- .github/workflows/build.yml | 26 ++++++++++++++++++++++++++ 1 file changed, 26 insertions(+) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index caee677..4233f1f 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -8,6 +8,11 @@ concurrency: group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }} cancel-in-progress: true +env: + CCACHE_DIR: ${{ github.workspace }}/ccache + CCACHE_MAXSIZE: 500M + CCACHE_KEY_SUFFIX: r1 + jobs: find-all-packages: runs-on: ubuntu-22.04 @@ -73,6 +78,17 @@ jobs: - name: checkout uses: actions/checkout@v4 + - name: ubuntu install ccache + if: runner.os == 'Linux' + run: | + sudo apt install ccache + ccache -V + - name: macos install ccache + if: runner.os == 'macOS' + run: | + brew install ccache + ccache -V + - name: setup python 3.12 uses: actions/setup-python@v5 with: @@ -93,6 +109,16 @@ jobs: - name: Conan export all packages run: python scripts/conan_export_all_packages.py + - name: cache + uses: actions/cache@v4 + with: + path: | + ~/.ccache + /Users/runner/Library/Caches/ccache + key: ${{ matrix.config.build_machine }}-${{ matrix.config.host_profile }}-${{ env.CCACHE_KEY_SUFFIX }} + restore-keys: | + ${{ matrix.config.build_machine }}-${{ matrix.config.host_profile }}- + - name: conan install run: conan install ${{ matrix.package.conanfile }} --version ${{ matrix.package.version }} --build missing --profile:host ${{ matrix.config.host_profile }} --profile:build ubuntu - name: conan source From 85ac402169f3247abd52426563c5cd5baa65a91b Mon Sep 17 00:00:00 2001 From: Vilius Sutkus '89 Date: Mon, 24 Jun 2024 21:38:45 +0300 Subject: [PATCH 26/27] Show ccache stats --- .github/workflows/build.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 4233f1f..e85eac1 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -142,3 +142,5 @@ jobs: - name: conan upload if: github.ref == 'refs/heads/main' || github.event_name == 'workflow_dispatch' run: conan upload "*" --check --confirm --remote odr + + - run: ccache --show-stats From 37bb728fd74ee8210c3a584235c63ae624219baa Mon Sep 17 00:00:00 2001 From: Vilius Sutkus '89 Date: Tue, 25 Jun 2024 01:05:35 +0300 Subject: [PATCH 27/27] Update conan_export_all_packages to properly handle paths when started from somewhere else than the root repository dir --- scripts/conan_export_all_packages.py | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/scripts/conan_export_all_packages.py b/scripts/conan_export_all_packages.py index 9814540..2e192fa 100644 --- a/scripts/conan_export_all_packages.py +++ b/scripts/conan_export_all_packages.py @@ -1,15 +1,18 @@ #!/usr/bin/env python3 -import os import subprocess +from pathlib import Path from list_package_versions import get_package_infos def main(): + script_path = Path(__file__).resolve().parent + root_path = script_path.parent + recipes_path = root_path / "recipes" package_infos = get_package_infos() for package in package_infos: for version in package_infos[package]: - conanfile = os.path.join("recipes", package, version["folder"], "conanfile.py") + conanfile = recipes_path / package / version["folder"] / "conanfile.py" subprocess.run(["conan", "export", conanfile, "--version", version["version"]])