Use lockfile and build_id

This commit is contained in:
jelle spijker 2022-11-03 08:14:07 +01:00 committed by jspijker
parent ce8a7b6109
commit 30555dbd5b
2 changed files with 10 additions and 2 deletions

View File

@ -7,6 +7,10 @@ on:
required: true required: true
type: string type: string
build_id:
required: true
type: number
recipe_id_full: recipe_id_full:
required: true required: true
type: string type: string
@ -131,11 +135,13 @@ jobs:
run: conan config install https://github.com/Ultimaker/conan-config.git run: conan config install https://github.com/Ultimaker/conan-config.git
- name: Associate build information with the Conan package - name: Associate build information with the Conan package
run: conan_build_info --v2 start ${{ inputs.project_name }} ${{ github.run_number }} run: conan_build_info --v2 start ${{ inputs.project_name }} ${{ github.run_number }}000${{ inputs.build_id }}
- name: Create the Packages - name: Create the Packages
if: ${{ !inputs.create_from_source }} if: ${{ !inputs.create_from_source }}
run: conan install ${{ inputs.recipe_id_full }} --build=missing --update run: |
conan lock create --reference ${{ inputs.recipe_id_full }} --build=missing --update
conan install ${{ inputs.recipe_id_full }} --build=missing --update --lockfile=conan.lock
- name: Create the Packages (from source) - name: Create the Packages (from source)
if: ${{ inputs.create_from_source }} if: ${{ inputs.create_from_source }}
@ -163,3 +169,4 @@ jobs:
run: | run: |
conan_build_info --v2 create buildinfo.json --lockfile conan.lock --user ${{ secrets.CONAN_USER }} --password ${{ secrets.CONAN_PASS }} conan_build_info --v2 create buildinfo.json --lockfile conan.lock --user ${{ secrets.CONAN_USER }} --password ${{ secrets.CONAN_PASS }}
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 publish buildinfo.json --url https://ultimaker.jfrog.io/artifactory --user ${{ secrets.CONAN_USER }} --password ${{ secrets.CONAN_PASS }}
conan_build_info --v2 stop

View File

@ -82,6 +82,7 @@ jobs:
uses: ultimaker/cura/.github/workflows/conan-package-create.yml@main uses: ultimaker/cura/.github/workflows/conan-package-create.yml@main
with: with:
project_name: cura project_name: cura
build_id: 1
recipe_id_full: ${{ needs.conan-recipe-version.outputs.recipe_id_full }} recipe_id_full: ${{ needs.conan-recipe-version.outputs.recipe_id_full }}
runs_on: 'ubuntu-20.04' runs_on: 'ubuntu-20.04'
python_version: '3.10.x' python_version: '3.10.x'