@@ -363,3 +363,158 @@ jobs:
363363 api-key : ${{ secrets.NUGET_DOT_ORG_API_KEY }}
364364 if : startsWith(github.ref, 'refs/tags/')
365365
366+ # #### conan - linux #####
367+ conan-linux :
368+ strategy :
369+ fail-fast : false
370+ matrix :
371+ include :
372+ - {os: debian, codename: bookworm, image_owner: }
373+ # - {os: debian, codename: bookworm, image_owner: i386/, labels: [i386,docker]}
374+ - {os: debian, codename: bookworm, image_owner: , labels: [arm32,docker]}
375+ - {os: debian, codename: bookworm, image_owner: , labels: [arm64,docker]}
376+ runs-on : ${{ (matrix.labels == '' && 'ubuntu-latest') || matrix.labels }}
377+ container : ${{ matrix.image_owner }}${{ matrix.os }}:${{ matrix.codename }}
378+ name : conan - linux | ${{ matrix.labels[0] }}
379+ steps :
380+ - name : add llvm repo (for clang-format)
381+ uses : myci-actions/add-deb-repo@main
382+ with :
383+ repo : deb http://apt.llvm.org/${{ matrix.codename }} llvm-toolchain-${{ matrix.codename }} main
384+ repo-name : llvm
385+ keys-asc : https://apt.llvm.org/llvm-snapshot.gpg.key
386+ install : clang-format clang-tidy
387+ - name : add cppfw deb repo
388+ uses : myci-actions/add-deb-repo@main
389+ with :
390+ repo : deb https://gagis.hopto.org/repo/cppfw/${{ matrix.os }} ${{ matrix.codename }} main
391+ repo-name : cppfw
392+ keys-asc : https://gagis.hopto.org/repo/cppfw/pubkey.gpg
393+ install : devscripts equivs myci pipx cmake git
394+ - name : add ~/.local/bin to PATH
395+ uses : myci-actions/export-env-var@main
396+ with : {name: PATH, value: "$PATH:$HOME/.local/bin"}
397+ - name : install conan
398+ run : pipx install conan
399+ - name : create default conan profile
400+ run : |
401+ conan profile detect --name default
402+ sed -i -E "s/compiler.cppstd=.*$/compiler.cppstd=17/g" ~/.conan2/profiles/default
403+ - name : git clone
404+ uses : myci-actions/checkout@main
405+ - name : set PACKAGE_VERSION
406+ uses : myci-actions/export-env-var@main
407+ with : {name: PACKAGE_VERSION, value: $(myci-deb-version.sh debian/changelog)}
408+ if : startsWith(github.ref, 'refs/tags/')
409+ - name : build
410+ run : |
411+ conan remote add cppfw $MYCI_CONAN_REMOTE
412+ conan create conan --build=missing --user $MYCI_CONAN_USER --channel main --version $PACKAGE_VERSION
413+ - name : deploy conan package
414+ run : |
415+ conan remote login --password $MYCI_CONAN_PASSWORD cppfw $MYCI_CONAN_USER
416+ conan upload --check --remote cppfw $PACKAGE_NAME/$PACKAGE_VERSION@$MYCI_CONAN_USER/main
417+ if : startsWith(github.ref, 'refs/tags/')
418+ # #### conan - macosx #####
419+ conan-macosx :
420+ strategy :
421+ fail-fast : false
422+ matrix :
423+ os :
424+ # - macos-10.15
425+ # - macos-11
426+ # - macos-12
427+ - macos-latest
428+ name : conan - ${{ matrix.os }}
429+ runs-on : ${{ matrix.os }}
430+ steps :
431+ - name : workaround python2 and python3 issue when upgrading python
432+ run : |
433+ rm -rf /usr/local/bin/2to3*
434+ rm -rf /usr/local/bin/idle3*
435+ rm -rf /usr/local/bin/pydoc3*
436+ rm -rf /usr/local/bin/python3
437+ rm -rf /usr/local/bin/python3-config
438+ rm -rf /usr/local/bin/python3*
439+ rm -rf /usr/local/bin/python3*-config
440+ - name : install clang-tidy and clang-format
441+ run : |
442+ brew install llvm
443+ ln -s "$(brew --prefix llvm)/bin/clang-format" "/usr/local/bin/clang-format"
444+ ln -s "$(brew --prefix llvm)/bin/clang-tidy" "/usr/local/bin/clang-tidy"
445+ ln -s "$(brew --prefix llvm)/bin/clang-apply-replacements" "/usr/local/bin/clang-apply-replacements"
446+ - name : git clone
447+ uses : myci-actions/checkout@main
448+ - name : add cppfw tap
449+ run : |
450+ brew tap cppfw/tap
451+ brew update
452+ - name : install ci tools
453+ run : brew install myci conan
454+ - name : create default conan profile
455+ run : |
456+ conan profile detect --name default
457+ sed -i -E "s/compiler.cppstd=.*$/compiler.cppstd=17/g" ~/.conan2/profiles/default
458+ - name : set PACKAGE_VERSION
459+ uses : myci-actions/export-env-var@main
460+ with : {name: PACKAGE_VERSION, value: $(myci-deb-version.sh debian/changelog)}
461+ if : startsWith(github.ref, 'refs/tags/')
462+ - name : build
463+ run : |
464+ conan remote add cppfw $MYCI_CONAN_REMOTE
465+ conan create conan --build=missing --user $MYCI_CONAN_USER --channel main --version $PACKAGE_VERSION
466+ - name : deploy conan package
467+ run : |
468+ conan remote login --password $MYCI_CONAN_PASSWORD cppfw $MYCI_CONAN_USER
469+ conan upload --check --remote cppfw $PACKAGE_NAME/$PACKAGE_VERSION@$MYCI_CONAN_USER/main
470+ if : startsWith(github.ref, 'refs/tags/')
471+
472+ # #### conan - emscripten #####
473+ conan-emscripten :
474+ strategy :
475+ fail-fast : false
476+ matrix :
477+ include :
478+ # - {os: ubuntu, codename: noble, image_owner: }
479+ - {os: debian, codename: bookworm, image_owner: }
480+ # - {os: debian, codename: bookworm, image_owner: i386/, labels: [i386,docker]}
481+ # - {os: debian, codename: bookworm, image_owner: , labels: [arm32,docker]}
482+ # - {os: debian, codename: bookworm, image_owner: , labels: [arm64,docker]}
483+ runs-on : ${{ (matrix.labels == '' && 'ubuntu-latest') || matrix.labels }}
484+ container : ${{ matrix.image_owner }}${{ matrix.os }}:${{ matrix.codename }}
485+ name : conan - emscripten | ${{ matrix.labels[0] }}
486+ steps :
487+ - name : add cppfw deb repo
488+ uses : myci-actions/add-deb-repo@main
489+ with :
490+ repo : deb https://gagis.hopto.org/repo/cppfw/${{ matrix.os }} ${{ matrix.codename }} main
491+ repo-name : cppfw
492+ keys-asc : https://gagis.hopto.org/repo/cppfw/pubkey.gpg
493+ install : devscripts equivs myci pipx cmake git nodejs
494+ - name : add ~/.local/bin to PATH
495+ uses : myci-actions/export-env-var@main
496+ with : {name: PATH, value: "$PATH:$HOME/.local/bin"}
497+ - name : install conan
498+ run : pipx install conan
499+ - name : create default conan profile
500+ run : |
501+ conan profile detect --name default
502+ sed -i -E "s/compiler.cppstd=.*$/compiler.cppstd=17/g" ~/.conan2/profiles/default
503+ - name : git clone
504+ uses : myci-actions/checkout@main
505+ with :
506+ submodules : false
507+ - name : set PACKAGE_VERSION
508+ uses : myci-actions/export-env-var@main
509+ with : {name: PACKAGE_VERSION, value: $(myci-deb-version.sh debian/changelog)}
510+ if : startsWith(github.ref, 'refs/tags/')
511+ - name : build
512+ run : |
513+ conan remote add cppfw $MYCI_CONAN_REMOTE
514+ # NOTE: specifying empty test folder to skip the test stage
515+ conan create conan --profile:build default --profile:host emscripten/conan.profile --build=missing --user $MYCI_CONAN_USER --channel main --version $PACKAGE_VERSION --test-folder ""
516+ - name : deploy conan package
517+ run : |
518+ conan remote login --password $MYCI_CONAN_PASSWORD cppfw $MYCI_CONAN_USER
519+ conan upload --check --remote cppfw $PACKAGE_NAME/$PACKAGE_VERSION@$MYCI_CONAN_USER/main
520+ if : startsWith(github.ref, 'refs/tags/')
0 commit comments