From 7ff05a7e08e3b0151ffc43b87dda5ce8c338c0bc Mon Sep 17 00:00:00 2001 From: Lia Stratopoulos <167905060+lia-viam@users.noreply.github.com> Date: Mon, 23 Sep 2024 15:41:49 -0400 Subject: [PATCH 01/21] first attempt conan ci job --- .github/workflows/conan.yml | 165 ++++++++++++++++++++++++++++++++++++ 1 file changed, 165 insertions(+) create mode 100644 .github/workflows/conan.yml diff --git a/.github/workflows/conan.yml b/.github/workflows/conan.yml new file mode 100644 index 000000000..1071e3f9d --- /dev/null +++ b/.github/workflows/conan.yml @@ -0,0 +1,165 @@ +name: Test conan packages + +on: + workflow_dispatch: + +jobs: + build_macos: + if: github.repository_owner == 'viamrobotics' + runs-on: macos-latest + strategy: + fail-fast: false + matrix: + include: + - target: aarch64-apple-darwin + platform: macosx_arm64 + - target: x86_64-apple-darwin + platform: macosx_x86_64 + steps: + - name: Checkout Code + uses: actions/checkout@v4 + + - name: Install dependencies + run: | + brew install cmake + brew install python ninja buf + python -m pip install --user conan + + - name: Build + run: | + # `buf` tries to read a CLI config file that we don't actually use located at + # ~/.config/buf/config.yaml. We don't always have permission to access this + # directory in CI, so we set the `BUF_CONFIG_DIR` to some other value that we + # do have permissions for. See https://github.com/bufbuild/buf/issues/2698 for + # more details. + export BUF_CONFIG_DIR=$(mktemp -d) + conan profile detect + conan create . + + build_linux_ubuntu_jammy: + if: github.repository_owner == 'viamrobotics' + runs-on: ${{ matrix.runs_on }} + container: + image: ${{ matrix.image }} + strategy: + fail-fast: false + matrix: + include: + - target: aarch64-ubuntu-jammy-gnu + platform: linux_aarch64-ubuntu-jammy + image: ubuntu:22.04 + runs_on: buildjet-8vcpu-ubuntu-2204-arm + - target: x86_64-ubuntu-jammy-gnu + platform: linux_x86_64-ubuntu-jammy + image: ubuntu:22.04 + runs_on: buildjet-8vcpu-ubuntu-2204 + + steps: + - name: Checkout Code + uses: actions/checkout@v4 + + - name: Install dependencies + run: | + apt-get update + apt-get -y dist-upgrade + DEBIAN_FRONTEND=noninteractive apt-get -y --no-install-recommends install \ + build-essential \ + ca-certificates \ + curl \ + doxygen \ + g++ \ + gdb \ + git \ + gnupg \ + gpg \ + less \ + ninja-build \ + python3 \ + python3-pip \ + software-properties-common \ + sudo \ + wget \ + + sudo wget -O - https://apt.kitware.com/keys/kitware-archive-latest.asc 2>/dev/null | sudo gpg --dearmor - | sudo tee /usr/share/keyrings/kitware-archive-keyring.gpg >/dev/null + sudo echo 'deb [signed-by=/usr/share/keyrings/kitware-archive-keyring.gpg] https://apt.kitware.com/ubuntu/ jammy main' | sudo tee /etc/apt/sources.list.d/kitware.list >/dev/null + + apt-get update + apt-get -y install cmake + + pip install conan + + - name: Create package + shell: bash + run: | + conan profile detect + conan create . + + build_linux_debian: + if: github.repository_owner == 'viamrobotics' + runs-on: ${{ matrix.runs_on }} + container: + image: ${{ matrix.image }} + strategy: + fail-fast: false + matrix: + include: + - target: aarch64-debian-bullseye + platform: linux_aarch64-debian-bullseye + image: debian:bullseye + runs_on: buildjet-8vcpu-ubuntu-2204-arm + - target: x86_64-debian-bullseye + platform: linux_x86_64-debian-bullseye + image: debian:bullseye + runs_on: buildjet-8vcpu-ubuntu-2204 + - target: aarch64-debian-bookworm + platform: linux_aarch64-debian-bookworm + image: debian:bookworm + runs_on: buildjet-8vcpu-ubuntu-2204-arm + - target: x86_64-debian-bookworm + platform: linux_x86_64-debian-bookworm + image: debian:bookworm + runs_on: buildjet-8vcpu-ubuntu-2204 + + steps: + - name: Checkout Code + uses: actions/checkout@v4 + + - name: Install dependencies + run: | + apt-get update + apt-get -y dist-upgrade + DEBIAN_FRONTEND=noninteractive apt-get -y --no-install-recommends install \ + build-essential \ + ca-certificates \ + cmake \ + curl \ + g++ \ + gdb \ + git \ + gnupg \ + gpg \ + less \ + ninja-build \ + python3 \ + python3-pip \ + software-properties-common \ + sudo \ + wget + + pip install conan + + - name: Update CMake for bullseye + if: ${{ matrix.image == 'debian:bullseye' }} + run: | + apt-add-repository -y 'deb http://deb.debian.org/debian bullseye-backports main' + + apt-get update + apt-get -y install cmake + + apt-get -y --no-install-recommends install -t bullseye-backports cmake + + - name: Create package + shell: bash + run: | + conan profile detect + conan create . From b04fc36d60a17c910223a62bc191ebf3aaf8cdd0 Mon Sep 17 00:00:00 2001 From: Lia Stratopoulos <167905060+lia-viam@users.noreply.github.com> Date: Mon, 23 Sep 2024 15:42:14 -0400 Subject: [PATCH 02/21] remove git --- .github/workflows/conan.yml | 2 -- 1 file changed, 2 deletions(-) diff --git a/.github/workflows/conan.yml b/.github/workflows/conan.yml index 1071e3f9d..d4d03f870 100644 --- a/.github/workflows/conan.yml +++ b/.github/workflows/conan.yml @@ -69,7 +69,6 @@ jobs: doxygen \ g++ \ gdb \ - git \ gnupg \ gpg \ less \ @@ -135,7 +134,6 @@ jobs: curl \ g++ \ gdb \ - git \ gnupg \ gpg \ less \ From 95f407e289a2705cd923fa8aed60415423ee1179 Mon Sep 17 00:00:00 2001 From: Lia Stratopoulos <167905060+lia-viam@users.noreply.github.com> Date: Tue, 24 Sep 2024 14:53:46 -0400 Subject: [PATCH 03/21] comment out repo owner --- .github/workflows/conan.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/conan.yml b/.github/workflows/conan.yml index d4d03f870..d4278b0b6 100644 --- a/.github/workflows/conan.yml +++ b/.github/workflows/conan.yml @@ -5,7 +5,7 @@ on: jobs: build_macos: - if: github.repository_owner == 'viamrobotics' + # if: github.repository_owner == 'viamrobotics' runs-on: macos-latest strategy: fail-fast: false @@ -37,7 +37,7 @@ jobs: conan create . build_linux_ubuntu_jammy: - if: github.repository_owner == 'viamrobotics' + # if: github.repository_owner == 'viamrobotics' runs-on: ${{ matrix.runs_on }} container: image: ${{ matrix.image }} @@ -94,7 +94,7 @@ jobs: conan create . build_linux_debian: - if: github.repository_owner == 'viamrobotics' + # if: github.repository_owner == 'viamrobotics' runs-on: ${{ matrix.runs_on }} container: image: ${{ matrix.image }} From c5bc9a6d386d8720deca78c9fce1cbae292d39d9 Mon Sep 17 00:00:00 2001 From: Lia Stratopoulos <167905060+lia-viam@users.noreply.github.com> Date: Tue, 24 Sep 2024 15:00:50 -0400 Subject: [PATCH 04/21] global install --- .github/workflows/conan.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/conan.yml b/.github/workflows/conan.yml index d4278b0b6..3634a4869 100644 --- a/.github/workflows/conan.yml +++ b/.github/workflows/conan.yml @@ -23,7 +23,7 @@ jobs: run: | brew install cmake brew install python ninja buf - python -m pip install --user conan + python -m pip install conan - name: Build run: | From be04812206a50a7209cdacd867387e71fef5011b Mon Sep 17 00:00:00 2001 From: Lia Stratopoulos <167905060+lia-viam@users.noreply.github.com> Date: Tue, 24 Sep 2024 15:09:15 -0400 Subject: [PATCH 05/21] always set build = missing --- .github/workflows/conan.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/conan.yml b/.github/workflows/conan.yml index 3634a4869..52ca377de 100644 --- a/.github/workflows/conan.yml +++ b/.github/workflows/conan.yml @@ -34,7 +34,7 @@ jobs: # more details. export BUF_CONFIG_DIR=$(mktemp -d) conan profile detect - conan create . + conan create . --build=missing build_linux_ubuntu_jammy: # if: github.repository_owner == 'viamrobotics' @@ -91,7 +91,7 @@ jobs: shell: bash run: | conan profile detect - conan create . + conan create . --build=missing build_linux_debian: # if: github.repository_owner == 'viamrobotics' @@ -160,4 +160,4 @@ jobs: shell: bash run: | conan profile detect - conan create . + conan create . --build=missing From 0b36cb53b091abd622972fafbc8d3e904f6f5a42 Mon Sep 17 00:00:00 2001 From: Lia Stratopoulos <167905060+lia-viam@users.noreply.github.com> Date: Tue, 24 Sep 2024 16:58:35 -0400 Subject: [PATCH 06/21] add prepare block for scheduling logic --- .github/workflows/conan.yml | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) diff --git a/.github/workflows/conan.yml b/.github/workflows/conan.yml index 52ca377de..75cce5c2e 100644 --- a/.github/workflows/conan.yml +++ b/.github/workflows/conan.yml @@ -1,11 +1,33 @@ name: Test conan packages on: + # Run weekdays at 11:15pm UTC, and specify below to only run if there's been new commits + schedule: + - cron: "15 11 * * 1-5" workflow_dispatch: jobs: + prepare: + # if: github.repository_owner == 'viamrobotics' + runs-on: ubuntu-latest + steps: + - name: Checkout Code + uses: actions/checkout@v4 + + - name: Get new commit count + id: new_commit_count + shell: bash + run: echo "commit_count=$(git log --oneline --since '24 hours ago' | wc -l)" >> $GITHUB_OUTPUT + + - name: Cancelling scheduled build with no new commits + uses: andymckay/cancel-action@0.2 + if: | + steps.new_commit_count.outputs.commit_count == '0' && + github.event_name == 'schedule' + build_macos: # if: github.repository_owner == 'viamrobotics' + needs: [prepare] runs-on: macos-latest strategy: fail-fast: false @@ -38,6 +60,7 @@ jobs: build_linux_ubuntu_jammy: # if: github.repository_owner == 'viamrobotics' + needs: [prepare] runs-on: ${{ matrix.runs_on }} container: image: ${{ matrix.image }} @@ -95,6 +118,7 @@ jobs: build_linux_debian: # if: github.repository_owner == 'viamrobotics' + needs: [prepare] runs-on: ${{ matrix.runs_on }} container: image: ${{ matrix.image }} From 6e041e2a07b0ed01101d37b77308cbbdba67f7e8 Mon Sep 17 00:00:00 2001 From: Lia Stratopoulos <167905060+lia-viam@users.noreply.github.com> Date: Tue, 24 Sep 2024 16:59:10 -0400 Subject: [PATCH 07/21] uncomment --- .github/workflows/conan.yml | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/.github/workflows/conan.yml b/.github/workflows/conan.yml index 75cce5c2e..a0823d156 100644 --- a/.github/workflows/conan.yml +++ b/.github/workflows/conan.yml @@ -3,12 +3,12 @@ name: Test conan packages on: # Run weekdays at 11:15pm UTC, and specify below to only run if there's been new commits schedule: - - cron: "15 11 * * 1-5" + - cron: "15 11 * * 1-5" workflow_dispatch: jobs: prepare: - # if: github.repository_owner == 'viamrobotics' + if: github.repository_owner == 'viamrobotics' runs-on: ubuntu-latest steps: - name: Checkout Code @@ -26,7 +26,7 @@ jobs: github.event_name == 'schedule' build_macos: - # if: github.repository_owner == 'viamrobotics' + if: github.repository_owner == 'viamrobotics' needs: [prepare] runs-on: macos-latest strategy: @@ -59,7 +59,7 @@ jobs: conan create . --build=missing build_linux_ubuntu_jammy: - # if: github.repository_owner == 'viamrobotics' + if: github.repository_owner == 'viamrobotics' needs: [prepare] runs-on: ${{ matrix.runs_on }} container: @@ -167,7 +167,7 @@ jobs: software-properties-common \ sudo \ wget - + pip install conan - name: Update CMake for bullseye From d6c30ebba4be2ad8da5c890e7123c1adc98a2044 Mon Sep 17 00:00:00 2001 From: Lia Stratopoulos <167905060+lia-viam@users.noreply.github.com> Date: Tue, 24 Sep 2024 17:01:36 -0400 Subject: [PATCH 08/21] uncomment missed --- .github/workflows/conan.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/conan.yml b/.github/workflows/conan.yml index a0823d156..827b19033 100644 --- a/.github/workflows/conan.yml +++ b/.github/workflows/conan.yml @@ -117,7 +117,7 @@ jobs: conan create . --build=missing build_linux_debian: - # if: github.repository_owner == 'viamrobotics' + if: github.repository_owner == 'viamrobotics' needs: [prepare] runs-on: ${{ matrix.runs_on }} container: From d5a93f0756eac00f1b0aa7e9b84eb9f20abaee8f Mon Sep 17 00:00:00 2001 From: Lia Stratopoulos <167905060+lia-viam@users.noreply.github.com> Date: Thu, 26 Sep 2024 11:46:33 -0400 Subject: [PATCH 09/21] change mac name to match linux ones --- .github/workflows/conan.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/conan.yml b/.github/workflows/conan.yml index 827b19033..05a71df86 100644 --- a/.github/workflows/conan.yml +++ b/.github/workflows/conan.yml @@ -47,7 +47,7 @@ jobs: brew install python ninja buf python -m pip install conan - - name: Build + - name: Create package run: | # `buf` tries to read a CLI config file that we don't actually use located at # ~/.config/buf/config.yaml. We don't always have permission to access this From 725f30360923b9dfa67a336c73711f0f5506b5cf Mon Sep 17 00:00:00 2001 From: Lia Stratopoulos <167905060+lia-viam@users.noreply.github.com> Date: Thu, 26 Sep 2024 13:14:51 -0400 Subject: [PATCH 10/21] use pipx for debian managed environment --- .github/workflows/conan.yml | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/.github/workflows/conan.yml b/.github/workflows/conan.yml index 05a71df86..3018f5abe 100644 --- a/.github/workflows/conan.yml +++ b/.github/workflows/conan.yml @@ -148,6 +148,8 @@ jobs: uses: actions/checkout@v4 - name: Install dependencies + # Note we use pipx below instead of python3-pip, see + # https://docs.conan.io/2/installation.html#install-with-pipx run: | apt-get update apt-get -y dist-upgrade @@ -163,12 +165,12 @@ jobs: less \ ninja-build \ python3 \ - python3-pip \ + pipx \ software-properties-common \ sudo \ wget - pip install conan + pipx install conan - name: Update CMake for bullseye if: ${{ matrix.image == 'debian:bullseye' }} @@ -183,5 +185,7 @@ jobs: - name: Create package shell: bash run: | + pipx ensurepath + source ~/.bashrc conan profile detect conan create . --build=missing From 53f8e4b6ef244656faa8845553a162b53c29b9f2 Mon Sep 17 00:00:00 2001 From: Lia Stratopoulos <167905060+lia-viam@users.noreply.github.com> Date: Thu, 26 Sep 2024 13:34:01 -0400 Subject: [PATCH 11/21] specify compiler standard --- .github/workflows/conan.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/conan.yml b/.github/workflows/conan.yml index 3018f5abe..e176cad49 100644 --- a/.github/workflows/conan.yml +++ b/.github/workflows/conan.yml @@ -56,7 +56,7 @@ jobs: # more details. export BUF_CONFIG_DIR=$(mktemp -d) conan profile detect - conan create . --build=missing + conan create . --build=missing -s compiler.cppstd=17 build_linux_ubuntu_jammy: if: github.repository_owner == 'viamrobotics' @@ -114,7 +114,7 @@ jobs: shell: bash run: | conan profile detect - conan create . --build=missing + conan create . --build=missing -s compiler.cppstd=14 build_linux_debian: if: github.repository_owner == 'viamrobotics' @@ -188,4 +188,4 @@ jobs: pipx ensurepath source ~/.bashrc conan profile detect - conan create . --build=missing + conan create . --build=missing -s compiler.cppstd=14 From 68488ea7c092538010b4dfb244215e6e92544fd3 Mon Sep 17 00:00:00 2001 From: Lia Stratopoulos <167905060+lia-viam@users.noreply.github.com> Date: Thu, 26 Sep 2024 14:26:54 -0400 Subject: [PATCH 12/21] split handling of pip by bookworm and bullseye --- .github/workflows/conan.yml | 34 ++++++++++++++++++++++++---------- 1 file changed, 24 insertions(+), 10 deletions(-) diff --git a/.github/workflows/conan.yml b/.github/workflows/conan.yml index e176cad49..4f50e76cd 100644 --- a/.github/workflows/conan.yml +++ b/.github/workflows/conan.yml @@ -148,8 +148,6 @@ jobs: uses: actions/checkout@v4 - name: Install dependencies - # Note we use pipx below instead of python3-pip, see - # https://docs.conan.io/2/installation.html#install-with-pipx run: | apt-get update apt-get -y dist-upgrade @@ -170,8 +168,6 @@ jobs: sudo \ wget - pipx install conan - - name: Update CMake for bullseye if: ${{ matrix.image == 'debian:bullseye' }} run: | @@ -182,10 +178,28 @@ jobs: apt-get -y --no-install-recommends install -t bullseye-backports cmake - - name: Create package - shell: bash + # Note bullseye can use regular pip + conan no problem, but + # bookworm is a managed environment so we use pipx. See + # https://docs.conan.io/2/installation.html#install-with-pipx + + - name: Install conan with pip and create package (Bullseye) + if: ${{ matrix.image == 'debian:bullseye' }} run: | - pipx ensurepath - source ~/.bashrc - conan profile detect - conan create . --build=missing -s compiler.cppstd=14 + DEBIAN_FRONTEND=noninteractive apt-get -y --no-install-recommends install \ + python3-pip \ + + pip install conan + conan profile detect + conan create . --build=missing -s compiler.cppstd=14 + + - name: Install conan with pipx and create package (Bookworm) + if: ${{ matrix.image == 'debian:bookworm' }} + run: | + DEBIAN_FRONTEND=noninteractive apt-get -y --no-install-recommends install \ + pipx \ + + pipx install conan + pipx ensurepath + source ~/.bashrc + conan profile detect + conan create . --build=missing -s compiler.cppstd=14 From 2bd5aae57b7c3668c31266b910db67ab99ded789 Mon Sep 17 00:00:00 2001 From: Lia Stratopoulos <167905060+lia-viam@users.noreply.github.com> Date: Thu, 26 Sep 2024 14:28:09 -0400 Subject: [PATCH 13/21] give bookworm python3-jinja2 --- .github/workflows/conan.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/conan.yml b/.github/workflows/conan.yml index 4f50e76cd..0d753d2b1 100644 --- a/.github/workflows/conan.yml +++ b/.github/workflows/conan.yml @@ -197,6 +197,7 @@ jobs: run: | DEBIAN_FRONTEND=noninteractive apt-get -y --no-install-recommends install \ pipx \ + python3-jinja2 pipx install conan pipx ensurepath From 53525a13bde02f43349d11f396ecbc25f2f87075 Mon Sep 17 00:00:00 2001 From: Lia Stratopoulos <167905060+lia-viam@users.noreply.github.com> Date: Thu, 26 Sep 2024 14:29:39 -0400 Subject: [PATCH 14/21] fix indent --- .github/workflows/conan.yml | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/.github/workflows/conan.yml b/.github/workflows/conan.yml index 0d753d2b1..655808b4f 100644 --- a/.github/workflows/conan.yml +++ b/.github/workflows/conan.yml @@ -195,12 +195,12 @@ jobs: - name: Install conan with pipx and create package (Bookworm) if: ${{ matrix.image == 'debian:bookworm' }} run: | - DEBIAN_FRONTEND=noninteractive apt-get -y --no-install-recommends install \ - pipx \ - python3-jinja2 - - pipx install conan - pipx ensurepath - source ~/.bashrc - conan profile detect - conan create . --build=missing -s compiler.cppstd=14 + DEBIAN_FRONTEND=noninteractive apt-get -y --no-install-recommends install \ + pipx \ + python3-jinja2 + + pipx install conan + pipx ensurepath + source ~/.bashrc + conan profile detect + conan create . --build=missing -s compiler.cppstd=14 From e1a4330556c8daa4a520ca1bbefef9fd7b7c191b Mon Sep 17 00:00:00 2001 From: Lia Stratopoulos <167905060+lia-viam@users.noreply.github.com> Date: Thu, 26 Sep 2024 15:33:38 -0400 Subject: [PATCH 15/21] fix indent again --- .github/workflows/conan.yml | 26 +++++++++++++------------- 1 file changed, 13 insertions(+), 13 deletions(-) diff --git a/.github/workflows/conan.yml b/.github/workflows/conan.yml index 655808b4f..2fe3ad446 100644 --- a/.github/workflows/conan.yml +++ b/.github/workflows/conan.yml @@ -185,22 +185,22 @@ jobs: - name: Install conan with pip and create package (Bullseye) if: ${{ matrix.image == 'debian:bullseye' }} run: | - DEBIAN_FRONTEND=noninteractive apt-get -y --no-install-recommends install \ + DEBIAN_FRONTEND=noninteractive apt-get -y --no-install-recommends install \ python3-pip \ - pip install conan - conan profile detect - conan create . --build=missing -s compiler.cppstd=14 + pip install conan + conan profile detect + conan create . --build=missing -s compiler.cppstd=14 - name: Install conan with pipx and create package (Bookworm) if: ${{ matrix.image == 'debian:bookworm' }} run: | - DEBIAN_FRONTEND=noninteractive apt-get -y --no-install-recommends install \ - pipx \ - python3-jinja2 - - pipx install conan - pipx ensurepath - source ~/.bashrc - conan profile detect - conan create . --build=missing -s compiler.cppstd=14 + DEBIAN_FRONTEND=noninteractive apt-get -y --no-install-recommends install \ + pipx \ + python3-jinja2 + + pipx install conan + pipx ensurepath + source ~/.bashrc + conan profile detect + conan create . --build=missing -s compiler.cppstd=14 From 6fbf86671f2f9ba1e51b5b8a133739b278ec102f Mon Sep 17 00:00:00 2001 From: Lia Stratopoulos <167905060+lia-viam@users.noreply.github.com> Date: Fri, 27 Sep 2024 10:11:11 -0400 Subject: [PATCH 16/21] try to unify to virtualenvwrapper --- .github/workflows/conan.yml | 35 ++++++++++++----------------------- 1 file changed, 12 insertions(+), 23 deletions(-) diff --git a/.github/workflows/conan.yml b/.github/workflows/conan.yml index 2fe3ad446..88bf426a6 100644 --- a/.github/workflows/conan.yml +++ b/.github/workflows/conan.yml @@ -26,7 +26,7 @@ jobs: github.event_name == 'schedule' build_macos: - if: github.repository_owner == 'viamrobotics' + if: false #github.repository_owner == 'viamrobotics' needs: [prepare] runs-on: macos-latest strategy: @@ -59,7 +59,7 @@ jobs: conan create . --build=missing -s compiler.cppstd=17 build_linux_ubuntu_jammy: - if: github.repository_owner == 'viamrobotics' + if: false #github.repository_owner == 'viamrobotics' needs: [prepare] runs-on: ${{ matrix.runs_on }} container: @@ -118,7 +118,7 @@ jobs: build_linux_debian: if: github.repository_owner == 'viamrobotics' - needs: [prepare] + # needs: [prepare] runs-on: ${{ matrix.runs_on }} container: image: ${{ matrix.image }} @@ -163,7 +163,8 @@ jobs: less \ ninja-build \ python3 \ - pipx \ + python3-pip \ + python3-virtualenvwrapper \ software-properties-common \ sudo \ wget @@ -179,28 +180,16 @@ jobs: apt-get -y --no-install-recommends install -t bullseye-backports cmake # Note bullseye can use regular pip + conan no problem, but - # bookworm is a managed environment so we use pipx. See - # https://docs.conan.io/2/installation.html#install-with-pipx - - - name: Install conan with pip and create package (Bullseye) - if: ${{ matrix.image == 'debian:bullseye' }} + # bookworm is a managed environment, so we use a virtualenvwrapper in both + - name: Install conan in venv and create package run: | - DEBIAN_FRONTEND=noninteractive apt-get -y --no-install-recommends install \ - python3-pip \ + export WORKON_HOME=~/venvs + mkdir -p $WORKON_HOME - pip install conan - conan profile detect - conan create . --build=missing -s compiler.cppstd=14 + source /usr/share/virtualenvwrapper/virtualenvwrapper.sh - - name: Install conan with pipx and create package (Bookworm) - if: ${{ matrix.image == 'debian:bookworm' }} - run: | - DEBIAN_FRONTEND=noninteractive apt-get -y --no-install-recommends install \ - pipx \ - python3-jinja2 + mkvirtualenv conan_env - pipx install conan - pipx ensurepath - source ~/.bashrc + pip install conan conan profile detect conan create . --build=missing -s compiler.cppstd=14 From ec879373cc4d01c45e65b96834c2f30b0e676f50 Mon Sep 17 00:00:00 2001 From: Lia Stratopoulos <167905060+lia-viam@users.noreply.github.com> Date: Fri, 27 Sep 2024 10:25:09 -0400 Subject: [PATCH 17/21] run in bash --- .github/workflows/conan.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/conan.yml b/.github/workflows/conan.yml index 88bf426a6..618be3957 100644 --- a/.github/workflows/conan.yml +++ b/.github/workflows/conan.yml @@ -182,6 +182,7 @@ jobs: # Note bullseye can use regular pip + conan no problem, but # bookworm is a managed environment, so we use a virtualenvwrapper in both - name: Install conan in venv and create package + shell: bash run: | export WORKON_HOME=~/venvs mkdir -p $WORKON_HOME From fa899c5f8f413401db156bbdb8842d805dffdd3b Mon Sep 17 00:00:00 2001 From: Lia Stratopoulos <167905060+lia-viam@users.noreply.github.com> Date: Fri, 27 Sep 2024 10:32:14 -0400 Subject: [PATCH 18/21] use regular venv --- .github/workflows/conan.yml | 12 ++++-------- 1 file changed, 4 insertions(+), 8 deletions(-) diff --git a/.github/workflows/conan.yml b/.github/workflows/conan.yml index 618be3957..e524116ce 100644 --- a/.github/workflows/conan.yml +++ b/.github/workflows/conan.yml @@ -164,7 +164,7 @@ jobs: ninja-build \ python3 \ python3-pip \ - python3-virtualenvwrapper \ + python3-venv \ software-properties-common \ sudo \ wget @@ -180,16 +180,12 @@ jobs: apt-get -y --no-install-recommends install -t bullseye-backports cmake # Note bullseye can use regular pip + conan no problem, but - # bookworm is a managed environment, so we use a virtualenvwrapper in both + # bookworm is a managed environment, so we use a venv in both - name: Install conan in venv and create package shell: bash run: | - export WORKON_HOME=~/venvs - mkdir -p $WORKON_HOME - - source /usr/share/virtualenvwrapper/virtualenvwrapper.sh - - mkvirtualenv conan_env + python3 -m venv ./conan_venv + source ./conan_venv/bin/activate pip install conan conan profile detect From 910dcb7de8edeb672b794765cdf16848374c0e6a Mon Sep 17 00:00:00 2001 From: Lia Stratopoulos <167905060+lia-viam@users.noreply.github.com> Date: Fri, 27 Sep 2024 10:45:46 -0400 Subject: [PATCH 19/21] try gnu14 --- .github/workflows/conan.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/conan.yml b/.github/workflows/conan.yml index e524116ce..49a3bbd3e 100644 --- a/.github/workflows/conan.yml +++ b/.github/workflows/conan.yml @@ -189,4 +189,4 @@ jobs: pip install conan conan profile detect - conan create . --build=missing -s compiler.cppstd=14 + conan create . --build=missing -s compiler.cppstd=gnu14 From 70e2467af6d4b745372deee1c05e7e347f1d1598 Mon Sep 17 00:00:00 2001 From: Lia Stratopoulos <167905060+lia-viam@users.noreply.github.com> Date: Fri, 27 Sep 2024 10:50:32 -0400 Subject: [PATCH 20/21] restore full matrix --- .github/workflows/conan.yml | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/.github/workflows/conan.yml b/.github/workflows/conan.yml index 49a3bbd3e..dd37a985d 100644 --- a/.github/workflows/conan.yml +++ b/.github/workflows/conan.yml @@ -26,7 +26,7 @@ jobs: github.event_name == 'schedule' build_macos: - if: false #github.repository_owner == 'viamrobotics' + if: github.repository_owner == 'viamrobotics' needs: [prepare] runs-on: macos-latest strategy: @@ -59,7 +59,7 @@ jobs: conan create . --build=missing -s compiler.cppstd=17 build_linux_ubuntu_jammy: - if: false #github.repository_owner == 'viamrobotics' + if: github.repository_owner == 'viamrobotics' needs: [prepare] runs-on: ${{ matrix.runs_on }} container: @@ -118,7 +118,7 @@ jobs: build_linux_debian: if: github.repository_owner == 'viamrobotics' - # needs: [prepare] + needs: [prepare] runs-on: ${{ matrix.runs_on }} container: image: ${{ matrix.image }} @@ -180,7 +180,8 @@ jobs: apt-get -y --no-install-recommends install -t bullseye-backports cmake # Note bullseye can use regular pip + conan no problem, but - # bookworm is a managed environment, so we use a venv in both + # bookworm is a managed environment, so we use a venv in both because it is more + # trouble to bifurcate them. - name: Install conan in venv and create package shell: bash run: | @@ -189,4 +190,4 @@ jobs: pip install conan conan profile detect - conan create . --build=missing -s compiler.cppstd=gnu14 + conan create . --build=missing -s compiler.cppstd=14 From 3704aede8bc6ae1e5ddbae47b8a9043932d08ad5 Mon Sep 17 00:00:00 2001 From: lia <167905060+lia-viam@users.noreply.github.com> Date: Fri, 27 Sep 2024 11:25:24 -0400 Subject: [PATCH 21/21] eof newline --- .github/workflows/conan.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/conan.yml b/.github/workflows/conan.yml index f507535ac..dd37a985d 100644 --- a/.github/workflows/conan.yml +++ b/.github/workflows/conan.yml @@ -190,4 +190,4 @@ jobs: pip install conan conan profile detect - conan create . --build=missing -s compiler.cppstd=14 \ No newline at end of file + conan create . --build=missing -s compiler.cppstd=14