]> git.proxmox.com Git - ceph.git/blob - ceph/src/arrow/dev/tasks/linux-packages/github.linux.amd64.yml
import quincy 17.2.0
[ceph.git] / ceph / src / arrow / dev / tasks / linux-packages / github.linux.amd64.yml
1 # Licensed to the Apache Software Foundation (ASF) under one
2 # or more contributor license agreements. See the NOTICE file
3 # distributed with this work for additional information
4 # regarding copyright ownership. The ASF licenses this file
5 # to you under the Apache License, Version 2.0 (the
6 # "License"); you may not use this file except in compliance
7 # with the License. You may obtain a copy of the License at
8 #
9 # http://www.apache.org/licenses/LICENSE-2.0
10 #
11 # Unless required by applicable law or agreed to in writing,
12 # software distributed under the License is distributed on an
13 # "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
14 # KIND, either express or implied. See the License for the
15 # specific language governing permissions and limitations
16 # under the License.
17
18 {% import 'macros.jinja' as macros with context %}
19
20 {{ macros.github_header() }}
21
22 jobs:
23 package:
24 name: Package
25 runs-on: ubuntu-20.04
26 steps:
27 {{ macros.github_checkout_arrow()|indent }}
28 {{ macros.github_login_dockerhub()|indent }}
29
30 - name: Set up Ruby
31 uses: ruby/setup-ruby@v1
32 with:
33 ruby-version: '3.0'
34 - name: Free Up Disk Space
35 shell: bash
36 run: arrow/ci/scripts/util_cleanup.sh
37 - name: Cache ccache
38 uses: actions/cache@v2
39 with:
40 path: arrow/dev/tasks/linux-packages/apache-arrow/{{ task_namespace }}/build/{{ target }}/ccache
41 key: linux-{{ task_namespace }}-ccache-{{ target }}-{{ "${{ hashFiles('arrow/cpp/**') }}" }}
42 restore-keys: linux-{{ task_namespace }}-ccache-{{ target }}-
43 - name: Build
44 run: |
45 set -e
46 pushd arrow/dev/tasks/linux-packages
47 rake version:update
48 rake docker:pull || :
49 rake --trace {{ task_namespace }}:build BUILD_DIR=build
50 sudo rm -rf */*/build
51 popd
52 env:
53 APT_TARGETS: {{ target }}
54 ARROW_VERSION: {{ arrow.version }}
55 REPO: {{ '${{ secrets.REPO }}' }}
56 YUM_TARGETS: {{ target }}
57 - uses: actions/upload-artifact@v2
58 with:
59 name: packages
60 path: packages/*/{{ task_namespace }}/repositories/
61 - name: Docker Push
62 continue-on-error: true
63 shell: bash
64 run: |
65 pushd arrow/dev/tasks/linux-packages
66 rake docker:push
67 popd
68 env:
69 APT_TARGETS: {{ target }}
70 REPO: {{ '${{ secrets.REPO }}' }}
71 YUM_TARGETS: {{ target }}
72 - name: Set up test
73 run: |
74 set -e
75 sudo apt update
76 # We can install createrepo_c by package with Ubuntu 22.04.
77 # createrepo_c \
78 sudo apt install -y \
79 apt-utils \
80 devscripts \
81 gpg \
82 rpm
83 gem install apt-dists-merge
84 (echo "Key-Type: RSA"; \
85 echo "Key-Length: 4096"; \
86 echo "Name-Real: Test"; \
87 echo "Name-Email: test@example.com"; \
88 echo "%no-protection") | \
89 gpg --full-generate-key --batch
90 GPG_KEY_ID=$(gpg --list-keys --with-colon test@example.com | grep fpr | cut -d: -f10)
91 echo "GPG_KEY_ID=${GPG_KEY_ID}" >> ${GITHUB_ENV}
92 gpg --export --armor test@example.com > arrow/dev/tasks/linux-packages/KEYS
93 # We can install createrepo_c by package with Ubuntu 22.04.
94 # This is workaround:
95 - name: Install createrepo_c
96 run: |
97 sudo apt install -y \
98 cmake \
99 libbz2-dev \
100 libcurl4-openssl-dev \
101 libglib2.0-dev \
102 liblzma-dev \
103 libmagic-dev \
104 librpm-dev \
105 libsqlite3-dev \
106 libssl-dev \
107 libxml2-dev \
108 libzstd-dev \
109 pkg-config \
110 zlib1g-dev
111 git clone --depth 1 https://github.com/rpm-software-management/createrepo_c.git
112 pushd createrepo_c
113 /usr/bin/cmake \
114 -DCMAKE_INSTALL_PREFIX=/usr \
115 -DENABLE_BASHCOMP=OFF \
116 -DENABLE_DRPM=OFF \
117 -DENABLE_PYTHON=OFF \
118 -DWITH_LIBMODULEMD=OFF \
119 -DWITH_ZCHUNK=OFF \
120 .
121 make -j$(nproc)
122 sudo make install
123 popd
124 rm -rf createrepo_c
125 - name: Test
126 run: |
127 set -e
128 pushd arrow/dev/tasks/linux-packages
129 rake --trace {{ task_namespace }}:test
130 rm -rf {{ task_namespace }}/repositories
131 popd
132 env:
133 APT_TARGETS: {{ target }}
134 ARROW_VERSION: {{ arrow.version }}
135 YUM_TARGETS: {{ target }}
136
137 {% set patterns = upload_extensions | format_all("arrow/dev/tasks/linux-packages/**/*{}") %}
138 {{ macros.github_upload_releases(patterns)|indent }}