Revert "Use CS remote"

This reverts commit 40cd4cd923.
This commit is contained in:
jspijker 2023-02-28 16:32:00 +01:00
parent 40cd4cd923
commit 06a9c5f7af
4 changed files with 223 additions and 130 deletions

View file

@ -51,8 +51,10 @@ on:
type: boolean
env:
CONAN_LOGIN_USERNAME: ${{ secrets.CONAN_USER }}
CONAN_PASSWORD: ${{ secrets.CONAN_PASS }}
CONAN_LOGIN_USERNAME_CURA: ${{ secrets.CONAN_USER }}
CONAN_PASSWORD_CURA: ${{ secrets.CONAN_PASS }}
CONAN_LOGIN_USERNAME_CURA_CE: ${{ secrets.CONAN_USER }}
CONAN_PASSWORD_CURA_CE: ${{ secrets.CONAN_PASS }}
CONAN_LOG_RUN_TO_OUTPUT: 1
CONAN_LOGGING_LEVEL: ${{ inputs.conan_logging_level }}
CONAN_NON_INTERACTIVE: 1
@ -76,6 +78,33 @@ jobs:
run: pip install -r https://raw.githubusercontent.com/Ultimaker/Cura/main/.github/workflows/requirements-conan-package.txt
# Note the runner requirements are always installed from the main branch in the Ultimaker/Cura repo
- name: Use Conan download cache (Bash)
if: ${{ runner.os != 'Windows' }}
run: conan config set storage.download_cache="$HOME/.conan/conan_download_cache"
- name: Use Conan download cache (Powershell)
if: ${{ runner.os == 'Windows' }}
run: conan config set storage.download_cache="C:\Users\runneradmin\.conan\conan_download_cache"
- name: Cache Conan local repository packages (Bash)
uses: actions/cache@v3
if: ${{ runner.os != 'Windows' }}
with:
path: |
$HOME/.conan/data
$HOME/.conan/conan_download_cache
key: conan-${{ inputs.runs_on }}-${{ runner.arch }}-create-cache
- name: Cache Conan local repository packages (Powershell)
uses: actions/cache@v3
if: ${{ runner.os == 'Windows' }}
with:
path: |
C:\Users\runneradmin\.conan\data
C:\.conan
C:\Users\runneradmin\.conan\conan_download_cache
key: conan-${{ inputs.runs_on }}-${{ runner.arch }}-create-cache
- name: Install MacOS system requirements
if: ${{ runner.os == 'Macos' }}
run: brew install autoconf automake ninja
@ -108,8 +137,19 @@ jobs:
- name: Create the default Conan profile
run: conan profile new default --detect
- name: Get Conan configuration from branch
if: ${{ inputs.conan_config_branch != '' }}
run: conan config install https://github.com/Ultimaker/conan-config.git -a "-b ${{ inputs.conan_config_branch }}"
- name: Get Conan configuration
run: conan config install https://github.com/Ultimaker/conan-config.git -a "-b cs_remote"
if: ${{ inputs.conan_config_branch == '' }}
run: conan config install https://github.com/Ultimaker/conan-config.git
- name: Create the lock file
if: ${{ inputs.build_info }}
run: |
conan_build_info --v2 start ${{ inputs.project_name }} ${{ github.run_number }}000${{ inputs.build_id }}
conan lock create --reference ${{ inputs.recipe_id_full }} --lockfile-out=conan.lock
- name: Create the Packages using lockfile
if: ${{ inputs.build_info }}
@ -129,7 +169,14 @@ jobs:
conan_build_info --v2 publish buildinfo.json --url https://ultimaker.jfrog.io/artifactory --user ${{ secrets.CONAN_USER }} --password ${{ secrets.CONAN_PASS }}
conan_build_info --v2 stop
- name: Upload the Package(s) to CS
- name: Upload the Package(s)
if: always()
run: |
conan upload ${{ inputs.recipe_id_full }} -r cs-conan-public --all -c
conan upload ${{ inputs.recipe_id_full }} -r cura --all -c
conan upload ${{ inputs.recipe_id_latest }} -r cura --all -c
- name: Upload the Package(s) community
if: ${{ inputs.conan_upload_community && always() }}
run: |
conan upload ${{ inputs.recipe_id_full }} -r cura-ce -c
conan upload ${{ inputs.recipe_id_latest }} -r cura-ce -c

View file

@ -86,6 +86,18 @@ jobs:
run: pip install -r https://raw.githubusercontent.com/Ultimaker/Cura/main/.github/workflows/requirements-conan-package.txt
# Note the runner requirements are always installed from the main branch in the Ultimaker/Cura repo
- name: Use Conan download cache (Bash)
if: ${{ runner.os != 'Windows' }}
run: conan config set storage.download_cache="$HOME/.conan/conan_download_cache"
- name: Cache Conan local repository packages (Bash)
uses: actions/cache@v3
with:
path: |
$HOME/.conan/data
$HOME/.conan/conan_download_cache
key: conan-ubuntu-${{ runner.arch }}-create-cache
# NOTE: Due to what are probably github issues, we have to remove the cache and reconfigure before the rest.
# This is maybe because grub caches the disk it uses last time, which is recreated each time.
- name: Install Linux system requirements
@ -108,24 +120,30 @@ jobs:
run: conan profile new default --detect
- name: Get Conan configuration
run: conan config install https://github.com/Ultimaker/conan-config.git -a "-b cs_remote"
run: conan config install https://github.com/Ultimaker/conan-config.git
- name: Create the Packages
run: conan create . ${{ needs.conan-recipe-version.outputs.recipe_id_full }} --build=missing --update -o ${{ needs.conan-recipe-version.outputs.project_name }}:devtools=True
- name: Remove the latest alias from CS
- name: Remove the latest alias
if: always()
run: conan remove ${{ inputs.recipe_id_latest }} -r cs-conan-public -f || true
run: conan remove ${{ needs.conan-recipe-version.outputs.recipe_id_latest }} -r cura -f || true
- name: Remove the latest alias from cura-ce
if: always()
run: conan remove ${{ needs.conan-recipe-version.outputs.recipe_id_latest }} -r cura-ce -f || true
- name: Create the latest alias
if: always()
run: conan alias ${{ needs.conan-recipe-version.outputs.recipe_id_latest }} ${{ needs.conan-recipe-version.outputs.recipe_id_full }}
- name: Upload the Package(s) to CS
- name: Upload the Package(s)
if: always()
run: |
conan upload ${{ needs.conan-recipe-version.outputs.recipe_id_full }} -r cs-conan-public --all -c
conan upload ${{ needs.conan-recipe-version.outputs.recipe_id_latest }} -r cs-conan-public --all -c
conan upload ${{ needs.conan-recipe-version.outputs.recipe_id_full }} -r cura --all -c
conan upload ${{ needs.conan-recipe-version.outputs.recipe_id_latest }} -r cura --all -c
conan upload ${{ needs.conan-recipe-version.outputs.recipe_id_full }} -r cura-ce -c
conan upload ${{ needs.conan-recipe-version.outputs.recipe_id_latest }} -r cura-ce -c
notify-create:
if: ${{ always() && (github.event_name == 'push' && (github.ref_name == 'main' || github.ref_name == 'master' || needs.conan-recipe-version.outputs.is_release_branch == 'true')) }}

View file

@ -37,8 +37,10 @@ on:
type: boolean
env:
CONAN_LOGIN_USERNAME: ${{ secrets.CONAN_USER }}
CONAN_PASSWORD: ${{ secrets.CONAN_PASS }}
CONAN_LOGIN_USERNAME_CURA: ${{ secrets.CONAN_USER }}
CONAN_PASSWORD_CURA: ${{ secrets.CONAN_PASS }}
CONAN_LOGIN_USERNAME_CURA_CE: ${{ secrets.CONAN_USER }}
CONAN_PASSWORD_CURA_CE: ${{ secrets.CONAN_PASS }}
CONAN_LOG_RUN_TO_OUTPUT: 1
CONAN_LOGGING_LEVEL: ${{ inputs.conan_logging_level }}
CONAN_NON_INTERACTIVE: 1
@ -64,8 +66,19 @@ jobs:
conan profile new default --detect
# Note the runner requirements are always installed from the main branch in the Ultimaker/Cura repo
- name: Cache Conan local repository packages
uses: actions/cache@v3
with:
path: $HOME/.conan/data
key: ${{ runner.os }}-conan-export-cache
- name: Get Conan configuration from branch
if: ${{ inputs.conan_config_branch != '' }}
run: conan config install https://github.com/Ultimaker/conan-config.git -a "-b ${{ inputs.conan_config_branch }}"
- name: Get Conan configuration
run: conan config install https://github.com/Ultimaker/conan-config.git -a "-b cs_remote"
if: ${{ inputs.conan_config_branch == '' }}
run: conan config install https://github.com/Ultimaker/conan-config.git
- name: Export the Package (binaries)
if: ${{ inputs.conan_export_binaries }}
@ -75,16 +88,26 @@ jobs:
if: ${{ !inputs.conan_export_binaries }}
run: conan export . ${{ inputs.recipe_id_full }}
- name: Remove the latest alias from CS
- name: Remove the latest alias
if: always()
run: conan remove ${{ inputs.recipe_id_latest }} -r cs-conan-public -f || true
run: conan remove ${{ inputs.recipe_id_latest }} -r cura -f || true
- name: Remove the latest alias from cura-ce
if: always()
run: conan remove ${{ inputs.recipe_id_latest }} -r cura-ce -f || true
- name: Create the latest alias
if: always()
run: conan alias ${{ inputs.recipe_id_latest }} ${{ inputs.recipe_id_full }}
- name: Upload the Package(s) to CS
- name: Upload the Package(s)
if: always()
run: |
conan upload ${{ inputs.recipe_id_full }} -r cs-conan-public --all -c
conan upload ${{ inputs.recipe_id_latest }} -r cs-conan-public --all -c
conan upload ${{ inputs.recipe_id_full }} -r cura --all -c
conan upload ${{ inputs.recipe_id_latest }} -r cura --all -c
- name: Upload the Package(s) community
if: ${{ inputs.conan_upload_community && always() }}
run: |
conan upload ${{ inputs.recipe_id_full }} -r cura-ce -c
conan upload ${{ inputs.recipe_id_latest }} -r cura-ce -c

View file

@ -192,7 +192,12 @@ jobs:
echo "PFX_PATH=$pfxPath" >> $env:GITHUB_OUTPUT;
- name: Get Conan configuration from branch
run: conan config install https://github.com/Ultimaker/conan-config.git -a "-b cs_remote"
if: ${{ inputs.conan_config != '' }}
run: conan config install https://github.com/Ultimaker/conan-config.git -a "-b ${{ inputs.conan_config }}"
- name: Get Conan configuration
if: ${{ inputs.conan_config == '' }}
run: conan config install https://github.com/Ultimaker/conan-config.git
- name: Create the Packages (Bash)
if: ${{ runner.os != 'Windows' }}