Welcome to mirror list, hosted at ThFree Co, Russian Federation.

conan-package-create.yml « workflows « .github - github.com/Ultimaker/Cura.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: ac0333bc9fa6273256444b422d3c84a81e156a1c (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
name: Create and Upload Conan package

on:
    workflow_call:
        inputs:
            recipe_id_full:
                required: true
                type: string

            runs_on:
                required: true
                type: string

            python_version:
                required: true
                type: string

            conan_config_branch:
                required: false
                type: string

            conan_logging_level:
                required: false
                type: string

            conan_clean_local_cache:
                required: false
                type: boolean
                default: false

env:
    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

jobs:
    conan-package-create:
        runs-on: ${{ inputs.runs_on }}

        steps:
            -   name: Checkout
                uses: actions/checkout@v3

            -   name: Setup Python and pip
                uses: actions/setup-python@v4
                with:
                    python-version: ${{ inputs.python_version }}
                    cache: 'pip'
                    cache-dependency-path: .github/workflows/requirements-conan-package.txt

            -   name: Install Python requirements and Create default Conan profile
                run: |
                    pip install -r .github/workflows/requirements-conan-package.txt
                    conan profile new default --detect

            -   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-${{ runner.os }}-${{ 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-${{ runner.os }}-${{ runner.arch }}-create-cache

            -   name: Install MacOS system requirements
                if:  ${{ runner.os == 'Macos' }}
                run: brew install autoconf automake ninja

            -   name: Install Linux system requirements
                if: ${{ runner.os == 'Linux' }}
                run: sudo apt install build-essential checkinstall libegl-dev zlib1g-dev libssl-dev ninja-build autoconf libx11-dev libx11-xcb-dev libfontenc-dev libice-dev libsm-dev libxau-dev libxaw7-dev libxcomposite-dev libxcursor-dev libxdamage-dev libxdmcp-dev libxext-dev libxfixes-dev libxi-dev libxinerama-dev libxkbfile-dev libxmu-dev libxmuu-dev libxpm-dev libxrandr-dev libxrender-dev libxres-dev libxss-dev libxt-dev libxtst-dev libxv-dev libxvmc-dev libxxf86vm-dev xtrans-dev libxcb-render0-dev libxcb-render-util0-dev libxcb-xkb-dev libxcb-icccm4-dev libxcb-image0-dev libxcb-keysyms1-dev libxcb-randr0-dev libxcb-shape0-dev libxcb-sync-dev libxcb-xfixes0-dev libxcb-xinerama0-dev xkb-data libxcb-dri3-dev uuid-dev libxcb-util-dev libxkbcommon-x11-dev pkg-config -y

            -   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
                if: ${{ inputs.conan_config_branch == '' }}
                run: conan config install https://github.com/Ultimaker/conan-config.git

            -   name: Create the Packages
                run: conan install ${{ inputs.recipe_id_full }} --build=missing --update

            -   name: Upload the Package(s)
                if: always()
                run: |
                    conan upload "*" -r cura --all -c
                    conan upload "*" -r cura-ce -c