Skip to content

Commit f848824

Browse files
committed
conan: macos
1 parent 66e493b commit f848824

File tree

3 files changed

+60
-58
lines changed

3 files changed

+60
-58
lines changed

.github/workflows/ci.yml

+53-55
Original file line numberDiff line numberDiff line change
@@ -362,7 +362,7 @@ jobs:
362362
repo: deb https://gagis.hopto.org/repo/cppfw/${{ matrix.os }} ${{ matrix.codename }} main
363363
repo-name: cppfw
364364
keys-asc: https://gagis.hopto.org/repo/cppfw/pubkey.gpg
365-
install: devscripts equivs myci prorab prorab-extra pipx cmake git
365+
install: devscripts equivs myci pipx cmake git
366366
- name: add ~/.local/bin to PATH
367367
uses: myci-actions/export-env-var@main
368368
with: {name: PATH, value: "$PATH:$HOME/.local/bin"}
@@ -388,57 +388,55 @@ jobs:
388388
conan upload --check --remote cppfw $PACKAGE_NAME/$PACKAGE_VERSION@$MYCI_CONAN_USER/main
389389
if: startsWith(github.ref, 'refs/tags/')
390390
##### conan - macosx #####
391-
# conan-macosx:
392-
# strategy:
393-
# fail-fast: false
394-
# matrix:
395-
# os:
396-
# # - macos-10.15
397-
# # - macos-11
398-
# - macos-12
399-
# name: conan - ${{ matrix.os }}
400-
# runs-on: ${{ matrix.os }}
401-
# steps:
402-
# - name: workaround python2 and python3 issue when upgrading python
403-
# run : |
404-
# rm -rf /usr/local/bin/2to3*
405-
# rm -rf /usr/local/bin/idle3*
406-
# rm -rf /usr/local/bin/pydoc3*
407-
# rm -rf /usr/local/bin/python3
408-
# rm -rf /usr/local/bin/python3-config
409-
# rm -rf /usr/local/bin/python3*
410-
# rm -rf /usr/local/bin/python3*-config
411-
# - name: git clone
412-
# uses: myci-actions/checkout@main
413-
# - name: install clang-tidy and clang-format
414-
# run: |
415-
# brew install llvm
416-
# ln -s "$(brew --prefix llvm)/bin/clang-format" "/usr/local/bin/clang-format"
417-
# ln -s "$(brew --prefix llvm)/bin/clang-tidy" "/usr/local/bin/clang-tidy"
418-
# ln -s "$(brew --prefix llvm)/bin/clang-apply-replacements" "/usr/local/bin/clang-apply-replacements"
419-
# - name: add cppfw tap
420-
# run: |
421-
# brew tap cppfw/tap
422-
# brew update
423-
# - name: install ci tools
424-
# run: brew install myci prorab prorab-extra conan make
425-
# - name: create default conan profile
426-
# run: |
427-
# conan profile detect --name default
428-
# sed -i -E "s/compiler.cppstd=.*$/compiler.cppstd=17/g" ~/.conan2/profiles/default
429-
# - name: set PATH to use latest make
430-
# uses: myci-actions/export-env-var@main
431-
# with: {name: PATH, value: "/usr/local/opt/make/libexec/gnubin:$PATH"}
432-
# - name: set PACKAGE_VERSION
433-
# uses: myci-actions/export-env-var@main
434-
# with: {name: PACKAGE_VERSION, value: $(myci-deb-version.sh debian/changelog)}
435-
# if: startsWith(github.ref, 'refs/tags/')
436-
# - name: build
437-
# run: |
438-
# conan remote add cppfw $MYCI_CONAN_REMOTE
439-
# conan create conan --user $MYCI_CONAN_USER --channel main --version $PACKAGE_VERSION
440-
# - name: deploy conan package
441-
# run: |
442-
# conan remote login --password $MYCI_CONAN_PASSWORD cppfw $MYCI_CONAN_USER
443-
# conan upload --check --remote cppfw $PACKAGE_NAME/$PACKAGE_VERSION@$MYCI_CONAN_USER/main
444-
# if: startsWith(github.ref, 'refs/tags/')
391+
conan-macosx:
392+
strategy:
393+
fail-fast: false
394+
matrix:
395+
os:
396+
# - macos-10.15
397+
# - macos-11
398+
# - macos-12
399+
- macos-latest
400+
name: conan - ${{ matrix.os }}
401+
runs-on: ${{ matrix.os }}
402+
steps:
403+
- name: workaround python2 and python3 issue when upgrading python
404+
run : |
405+
rm -rf /usr/local/bin/2to3*
406+
rm -rf /usr/local/bin/idle3*
407+
rm -rf /usr/local/bin/pydoc3*
408+
rm -rf /usr/local/bin/python3
409+
rm -rf /usr/local/bin/python3-config
410+
rm -rf /usr/local/bin/python3*
411+
rm -rf /usr/local/bin/python3*-config
412+
- name: git clone
413+
uses: myci-actions/checkout@main
414+
- name: install clang-tidy and clang-format
415+
run: |
416+
brew install llvm
417+
ln -s "$(brew --prefix llvm)/bin/clang-format" "/usr/local/bin/clang-format"
418+
ln -s "$(brew --prefix llvm)/bin/clang-tidy" "/usr/local/bin/clang-tidy"
419+
ln -s "$(brew --prefix llvm)/bin/clang-apply-replacements" "/usr/local/bin/clang-apply-replacements"
420+
- name: add cppfw tap
421+
run: |
422+
brew tap cppfw/tap
423+
brew update
424+
- name: install ci tools
425+
run: brew install myci conan
426+
- name: create default conan profile
427+
run: |
428+
conan profile detect --name default
429+
sed -i -E "s/compiler.cppstd=.*$/compiler.cppstd=17/g" ~/.conan2/profiles/default
430+
- name: set PACKAGE_VERSION
431+
uses: myci-actions/export-env-var@main
432+
with: {name: PACKAGE_VERSION, value: $(myci-deb-version.sh debian/changelog)}
433+
if: startsWith(github.ref, 'refs/tags/')
434+
- name: build
435+
run: |
436+
conan remote add cppfw $MYCI_CONAN_REMOTE
437+
conan create conan --user $MYCI_CONAN_USER --channel main --version $PACKAGE_VERSION
438+
- name: deploy conan package
439+
run: |
440+
conan remote login --password $MYCI_CONAN_PASSWORD cppfw $MYCI_CONAN_USER
441+
conan upload --check --remote cppfw $PACKAGE_NAME/$PACKAGE_VERSION@$MYCI_CONAN_USER/main
442+
if: startsWith(github.ref, 'refs/tags/')

conan/conanfile.py

+6-2
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,10 @@ class ClargsConan(ConanFile):
2020
def requirements(self):
2121
self.requires("utki/[>=1.1.202]@cppfw/main", transitive_headers=True, transitive_libs=True)
2222

23+
def build_requirements(self):
24+
self.tool_requires("prorab/[>=2.0.27]@cppfw/main")
25+
self.tool_requires("prorab-extra/[>=0.2.57]@cppfw/main")
26+
2327
def config_options(self):
2428
if self.settings.os == "Windows":
2529
del self.options.fPIC
@@ -44,8 +48,8 @@ def source(self):
4448
git.run("submodule update --init --remote --depth 1")
4549

4650
def build(self):
47-
self.run("make lint=off")
48-
self.run("make lint=off test")
51+
self.run("make $MAKE_INCLUDE_DIRS_ARG lint=off")
52+
self.run("make $MAKE_INCLUDE_DIRS_ARG lint=off test")
4953

5054
def package(self):
5155
src_dir = os.path.join(self.build_folder, "src")

0 commit comments

Comments
 (0)