Skip to content

Attempt to build properly on windows and mac #76

Attempt to build properly on windows and mac

Attempt to build properly on windows and mac #76

Workflow file for this run

name: build_test
on:
workflow_dispatch:
push:
branches:
- main
- libiconv
pull_request:
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
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.os }}
needs:
- find-all-packages
strategy:
fail-fast: false
matrix:
package: ${{ fromJson(needs.find-all-packages.outputs.packages) }}
config:
# - { 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 }
- { os: macos-13, compiler: ndk-26.3.11579264, host-profile: armv8 }
# - { os: macos-13, compiler: ndk-26.3.11579264, host-profile: x86_64 }
# - { os: macos-13, compiler: ndk-26.3.11579264, host-profile: armv7 }
# - { os: macos-13, compiler: ndk-26.3.11579264, host-profile: x86 }
- { os: windows-2022, compiler: ndk-26.3.11579264, host-profile: armv8 }
# - { os: windows-2022, compiler: ndk-26.3.11579264, host-profile: x86_64 }
# - { os: windows-2022, compiler: ndk-26.3.11579264, host-profile: armv7 }
# - { os: windows-2022, compiler: ndk-26.3.11579264, host-profile: x86 }
steps:
- name: checkout
uses: actions/checkout@v4
- name: Set up JDK 17
uses: actions/setup-java@v4
with:
java-version: '17'
distribution: 'temurin'
- name: Setup Android SDK
uses: android-actions/setup-android@v3
with:
packages: 'ndk;26.3.11579264'
- 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:
python-version: 3.12
- name: install python dependencies
run: pip install --upgrade pip conan setuptools
- name: conan config
run: conan config install .github/config/${{ matrix.config.os }}-${{ matrix.config.compiler }}/conan
- 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_version }} --build missing --profile:host ${{ matrix.config.host-profile }}