Skip to content

Commit

Permalink
conan: macos
Browse files Browse the repository at this point in the history
  • Loading branch information
igagis committed Dec 3, 2024
1 parent fda02a7 commit 2538268
Show file tree
Hide file tree
Showing 3 changed files with 59 additions and 59 deletions.
110 changes: 54 additions & 56 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -470,7 +470,7 @@ jobs:
include:
- {os: debian, codename: bookworm, image_owner: }
# - {os: debian, codename: bookworm, image_owner: i386/, labels: [i386,docker]}
# - {os: debian, codename: bookworm, image_owner: , labels: [arm32,docker]}
- {os: debian, codename: bookworm, image_owner: , labels: [arm32,docker]}
- {os: debian, codename: bookworm, image_owner: , labels: [arm64,docker]}
runs-on: ${{ (matrix.labels == '' && 'ubuntu-latest') || matrix.labels }}
container: ${{ matrix.image_owner }}${{ matrix.os }}:${{ matrix.codename }}
Expand All @@ -489,7 +489,7 @@ jobs:
repo: deb https://gagis.hopto.org/repo/cppfw/${{ matrix.os }} ${{ matrix.codename }} main
repo-name: cppfw
keys-asc: https://gagis.hopto.org/repo/cppfw/pubkey.gpg
install: devscripts equivs myci prorab prorab-extra pipx cmake git libx11-dev
install: devscripts equivs myci pipx cmake git libx11-dev
- name: add ~/.local/bin to PATH
uses: myci-actions/export-env-var@main
with: {name: PATH, value: "$PATH:$HOME/.local/bin"}
Expand All @@ -515,57 +515,55 @@ jobs:
conan upload --check --remote cppfw $PACKAGE_NAME/$PACKAGE_VERSION@$MYCI_CONAN_USER/main
if: startsWith(github.ref, 'refs/tags/')
##### conan - macosx #####
# conan-macosx:
# strategy:
# fail-fast: false
# matrix:
# os:
# # - macos-10.15
# - macos-11
# # - macos-12
# name: conan - ${{ matrix.os }}
# runs-on: ${{ matrix.os }}
# steps:
# - name: workaround python2 and python3 issue when upgrading python
# run : |
# rm -rf /usr/local/bin/2to3*
# rm -rf /usr/local/bin/idle3*
# rm -rf /usr/local/bin/pydoc3*
# rm -rf /usr/local/bin/python3
# rm -rf /usr/local/bin/python3-config
# rm -rf /usr/local/bin/python3*
# rm -rf /usr/local/bin/python3*-config
# - name: git clone
# uses: myci-actions/checkout@main
# - name: install clang-tidy and clang-format
# run: |
# brew install llvm
# ln -s "$(brew --prefix llvm)/bin/clang-format" "/usr/local/bin/clang-format"
# ln -s "$(brew --prefix llvm)/bin/clang-tidy" "/usr/local/bin/clang-tidy"
# ln -s "$(brew --prefix llvm)/bin/clang-apply-replacements" "/usr/local/bin/clang-apply-replacements"
# - name: add cppfw tap
# run: |
# brew tap cppfw/tap
# brew update
# - name: install ci tools
# run: brew install myci prorab prorab-extra conan make pkg-config
# - name: create default conan profile
# run: |
# conan profile detect --name default
# sed -i -E "s/compiler.cppstd=.*$/compiler.cppstd=17/g" ~/.conan2/profiles/default
# - name: set PATH to use latest make
# uses: myci-actions/export-env-var@main
# with: {name: PATH, value: "/usr/local/opt/make/libexec/gnubin:$PATH"}
# - name: set PACKAGE_VERSION
# uses: myci-actions/export-env-var@main
# with: {name: PACKAGE_VERSION, value: $(myci-deb-version.sh debian/changelog)}
# if: startsWith(github.ref, 'refs/tags/')
# - name: build
# run: |
# conan remote add cppfw $MYCI_CONAN_REMOTE
# conan create conan --user $MYCI_CONAN_USER --channel main --version $PACKAGE_VERSION
# - name: deploy conan package
# run: |
# conan remote login --password $MYCI_CONAN_PASSWORD cppfw $MYCI_CONAN_USER
# conan upload --check --remote cppfw $PACKAGE_NAME/$PACKAGE_VERSION@$MYCI_CONAN_USER/main
# if: startsWith(github.ref, 'refs/tags/')
conan-macosx:
strategy:
fail-fast: false
matrix:
os:
# - macos-10.15
# - macos-11
# - macos-12
- macos-latest
name: conan - ${{ matrix.os }}
runs-on: ${{ matrix.os }}
steps:
- name: workaround python2 and python3 issue when upgrading python
run : |
rm -rf /usr/local/bin/2to3*
rm -rf /usr/local/bin/idle3*
rm -rf /usr/local/bin/pydoc3*
rm -rf /usr/local/bin/python3
rm -rf /usr/local/bin/python3-config
rm -rf /usr/local/bin/python3*
rm -rf /usr/local/bin/python3*-config
- name: git clone
uses: myci-actions/checkout@main
- name: install clang-tidy and clang-format
run: |
brew install llvm
ln -s "$(brew --prefix llvm)/bin/clang-format" "/usr/local/bin/clang-format"
ln -s "$(brew --prefix llvm)/bin/clang-tidy" "/usr/local/bin/clang-tidy"
ln -s "$(brew --prefix llvm)/bin/clang-apply-replacements" "/usr/local/bin/clang-apply-replacements"
- name: add cppfw tap
run: |
brew tap cppfw/tap
brew update
- name: install ci tools
run: brew install myci conan
- name: create default conan profile
run: |
conan profile detect --name default
sed -i -E "s/compiler.cppstd=.*$/compiler.cppstd=17/g" ~/.conan2/profiles/default
- name: set PACKAGE_VERSION
uses: myci-actions/export-env-var@main
with: {name: PACKAGE_VERSION, value: $(myci-deb-version.sh debian/changelog)}
if: startsWith(github.ref, 'refs/tags/')
- name: build
run: |
conan remote add cppfw $MYCI_CONAN_REMOTE
conan create conan --build=missing --user $MYCI_CONAN_USER --channel main --version $PACKAGE_VERSION
- name: deploy conan package
run: |
conan remote login --password $MYCI_CONAN_PASSWORD cppfw $MYCI_CONAN_USER
conan upload --check --remote cppfw $PACKAGE_NAME/$PACKAGE_VERSION@$MYCI_CONAN_USER/main
if: startsWith(github.ref, 'refs/tags/')
6 changes: 4 additions & 2 deletions conan/conanfile.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,8 @@ def requirements(self):

def build_requirements(self):
self.requires("tst/[>=0.3.29]@cppfw/main", visible=False)
self.tool_requires("prorab/[>=2.0.27]@cppfw/main")
self.tool_requires("prorab-extra/[>=0.2.57]@cppfw/main")

def config_options(self):
if self.settings.os == "Windows":
Expand All @@ -51,8 +53,8 @@ def source(self):
git.run("submodule update --init --remote --depth 1")

def build(self):
self.run("make lint=off")
self.run("make lint=off test")
self.run("make $MAKE_INCLUDE_DIRS_ARG lint=off")
self.run("make $MAKE_INCLUDE_DIRS_ARG lint=off test")

def package(self):
src_dir = os.path.join(self.build_folder, "src")
Expand Down
2 changes: 1 addition & 1 deletion tool-configs

0 comments on commit 2538268

Please sign in to comment.