lordgamez commented on code in PR #2212:
URL: https://github.com/apache/nifi-minifi-cpp/pull/2212#discussion_r3542596157


##########
.github/workflows/ci.yml:
##########
@@ -84,9 +87,17 @@ jobs:
           echo 
"PATH=/opt/homebrew/opt/ccache:/opt/homebrew/opt/ccache/bin:/opt/homebrew/opt/ccache/libexec:$PATH"
 >> $GITHUB_ENV
           echo "DYLD_LIBRARY_PATH=$(brew --prefix)/lib" >> $GITHUB_ENV
           echo -e "127.0.0.1\t$HOSTNAME" | sudo tee -a /etc/hosts > /dev/null
+          mkdir -p ~/.conan2/extensions/plugins/compatibility
+          cp .github/conan/compatibility.py 
~/.conan2/extensions/plugins/compatibility/compatibility.py
       - name: build
         run: |
-          python -m venv venv && source venv/bin/activate && pip install -r 
requirements.txt && python main.py --noninteractive --skip-compiler-install 
--cmake-options="-DCMAKE_C_FLAGS=${CPPFLAGS} ${CFLAGS} 
-DCMAKE_CXX_FLAGS=${CPPFLAGS} ${CXXFLAGS}" 
--minifi-options="${MACOS_MINIFI_OPTIONS}"
+          python -m venv venv && source venv/bin/activate && pip install -r 
requirements.txt && \
+          python main.py --noninteractive --skip-compiler-install 
--cmake-options="-DCMAKE_C_FLAGS=${CPPFLAGS} ${CFLAGS} 
-DCMAKE_CXX_FLAGS=${CPPFLAGS} ${CXXFLAGS}" 
--minifi-options="${MACOS_MINIFI_OPTIONS}"
+        working-directory: bootstrap
+      - name: Upload conan packages
+        if: always() && github.event_name == 'push' && github.ref == 
'refs/heads/main'
+        run: |
+          source venv/bin/activate && conan remote login nifi-conan && conan 
upload "*" -r nifi-conan --confirm
         working-directory: bootstrap

Review Comment:
   On second thought it may be possible that even when the recipe is available 
on conan center, the binaries are not matching the platform we are using and 
still needs to be built locally, these locally built thirdparty libraries 
should also be uploaded. Reverted the change in 
https://github.com/apache/nifi-minifi-cpp/pull/2212/commits/a7c04e179a4817a2f866e3099b818165eb321086



##########
.github/workflows/ci.yml:
##########
@@ -192,14 +204,27 @@ jobs:
           if ((Get-FileHash 'sqliteodbc_w64.exe').Hash -ne 
"a4804e4f54f42c721df1323c5fcac101a8c7a577e7f20979227324ceab572d51") {Write 
"Hash mismatch"; Exit 1}
           Start-Process -FilePath ".\sqliteodbc_w64.exe" -ArgumentList "/S" 
-Wait
         shell: powershell
+      - name: Copy conan compatibility.py
+        shell: powershell
+        run: |
+          $compatDir = Join-Path $env:USERPROFILE 
".conan2\extensions\plugins\compatibility"
+          New-Item -ItemType Directory -Force -Path $compatDir | Out-Null
+          Copy-Item ".github\conan\compatibility.py" (Join-Path $compatDir 
"compatibility.py")
       - name: Zero sccache stats
         run: sccache --zero-stats
         shell: bash
       - name: build
+        working-directory: bootstrap
         run: |
-          python -m venv venv & venv\Scripts\activate & pip install -r 
requirements.txt & python main.py --noninteractive --skip-compiler-install 
--minifi-options="%WINDOWS_MINIFI_OPTIONS%" 
--cmake-options="-DCMAKE_C_COMPILER_LAUNCHER=sccache 
-DCMAKE_CXX_COMPILER_LAUNCHER=sccache"
+          python -m venv venv && venv\Scripts\activate && pip install -r 
requirements.txt && ^
+          python main.py --noninteractive --skip-compiler-install 
--minifi-options="%WINDOWS_MINIFI_OPTIONS%" 
--cmake-options="-DCMAKE_C_COMPILER_LAUNCHER=sccache 
-DCMAKE_CXX_COMPILER_LAUNCHER=sccache"
         shell: cmd
+      - name: Upload conan packages
+        if: always() && github.event_name == 'push' && github.ref == 
'refs/heads/main'
         working-directory: bootstrap
+        run: |
+          venv\Scripts\activate && conan remote login nifi-conan && conan 
upload "*" -r nifi-conan --confirm
+        shell: cmd

Review Comment:
   On second thought it may be possible that even when the recipe is available 
on conan center, the binaries are not matching the platform we are using and 
still needs to be built locally, these locally built thirdparty libraries 
should also be uploaded. Reverted the change in 
https://github.com/apache/nifi-minifi-cpp/pull/2212/commits/a7c04e179a4817a2f866e3099b818165eb321086



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to