-
Notifications
You must be signed in to change notification settings - Fork 3.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
ARROW-2676: [Packaging] Deploy build artifacts to github releases #2109
Changes from all commits
0ab0567
b65cb3f
8a5fcb0
a0a8127
bd5ece4
edeee71
55e7ccb
96e101a
0b79d13
5374866
8c069c6
5c6e154
fd6bd23
14da2d5
ccbc150
167a393
af6dd48
0773f3a
95bc3fa
bfb5eae
71b6943
0561e62
9b22238
4c64db6
1b3d5fb
12efaba
337234d
f317a06
2e9fcf9
e4e971c
b892471
062da7c
0701d64
83f333b
87860d0
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -80,12 +80,12 @@ submission. The tasks are defined in `tasks.yml` | |
6. Install the python dependencies for the script: | ||
|
||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. One thing that is worth nothing in this Traceback (most recent call last):
File "crossbow.py", line 413, in <module>
crossbow(auto_envvar_prefix='CROSSBOW')
File "/home/phillip/miniconda/envs/pyarrow36/lib/python3.6/site-packages/click/core.py", line 722, in __call__
return self.main(*args, **kwargs)
File "/home/phillip/miniconda/envs/pyarrow36/lib/python3.6/site-packages/click/core.py", line 697, in main
rv = self.invoke(ctx)
File "/home/phillip/miniconda/envs/pyarrow36/lib/python3.6/site-packages/click/core.py", line 1066, in invoke
return _process_result(sub_ctx.command.invoke(sub_ctx))
File "/home/phillip/miniconda/envs/pyarrow36/lib/python3.6/site-packages/click/core.py", line 895, in invoke
return ctx.invoke(self.callback, **ctx.params)
File "/home/phillip/miniconda/envs/pyarrow36/lib/python3.6/site-packages/click/core.py", line 535, in invoke
return callback(*args, **kwargs)
File "crossbow.py", line 356, in submit
queue.put(job)
File "crossbow.py", line 186, in put
branch = self._create_branch(task.branch, files=task.files())
File "crossbow.py", line 158, in _create_branch
parents = parents or [self.head]
File "crossbow.py", line 96, in head
return self.repo.head.target
_pygit2.GitError: reference 'refs/heads/master' not found Is there any way that we can automate this away? If not, make sure to add a note about it in the README. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. We don't need parent commits, it just makes the graph nicer. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Resolved |
||
```bash | ||
conda install -y jinja2 pygit2 click pyyaml | ||
conda install -y jinja2 pygit2 click pyyaml setuptools_scm github3.py | ||
``` | ||
|
||
```bash | ||
# pygit2 requires libgit2: http://www.pygit2.org/install.html | ||
pip install -y jinja2 pygit2 click pyyaml | ||
pip install -y jinja2 pygit2 click pyyaml setuptools_scm github3.py | ||
``` | ||
|
||
7. Try running it: | ||
|
@@ -106,7 +106,7 @@ The script does the following: | |
$ git clone https://github.com/kszucs/crossbow | ||
|
||
$ cd arrow/dev/tasks | ||
$ python crossbow.py | ||
$ python crossbow.py submit conda-win conda-linux conda-osx | ||
``` | ||
|
||
2. Gets the HEAD commit of the currently checked out branch and generates | ||
|
@@ -115,94 +115,65 @@ The script does the following: | |
|
||
```bash | ||
git checkout ARROW-<ticket number> | ||
python dev/tasks/crossbow.py --dry-run | ||
python dev/tasks/crossbow.py submit --dry-run conda-linux conda-osx | ||
``` | ||
|
||
> Note that the arrow branch must be pushed beforehand, because the script | ||
> will clone the selected branch. | ||
|
||
3. Reads and renders the required build configurations with the parameters | ||
substituted. | ||
2. Create a commit per build configuration to its own branch. For example | ||
to build `travis-linux-conda.yml` it will place a commit to the tip of | ||
`crossbow@travis-linux-conda` branch. | ||
2. Create a branch per task, prefixed with the job id. For example | ||
to build conda recipes on linux it will create a new branch: | ||
`crossbow@build-<id>-conda-linux`. | ||
3. Pushes the modified branches to GitHub which triggers the builds. | ||
For authentication it uses github oauth tokens described in the install | ||
section. | ||
|
||
|
||
### Examples | ||
|
||
The script accepts a pattern as a first argument to narrow the build scope: | ||
|
||
Run all builds: | ||
### Query the build status | ||
|
||
```bash | ||
$ python crossbow.py | ||
Repository: https://github.com/kszucs/arrow@tasks | ||
Commit SHA: 810a718836bb3a8cefc053055600bdcc440e6702 | ||
Version: 0.9.1.dev48+g810a7188.d20180414 | ||
Pushed branches: | ||
- travis-osx-wheel | ||
- travis-linux-packages | ||
- travis-linux-wheel | ||
- appveyor-win-wheel | ||
- appveyor-win-conda | ||
- travis-linux-conda | ||
- travis-osx-conda | ||
python crossbow.py status <build id / branch name> | ||
``` | ||
|
||
Just render without applying or committing the changes: | ||
### Download the build artifacts | ||
|
||
```bash | ||
$ python crossbow.py --dry-run | ||
python crossbow.py artifacts <build id / branch name> | ||
``` | ||
|
||
Run only `conda` package builds but on all platforms: | ||
### Examples | ||
|
||
The script accepts a pattern as a first argument to narrow the build scope: | ||
|
||
Run multiple builds: | ||
|
||
```bash | ||
$ python crossbow.py conda | ||
$ python crossbow.py submit linux-packages conda-linux wheel-win | ||
Repository: https://github.com/kszucs/arrow@tasks | ||
Commit SHA: 810a718836bb3a8cefc053055600bdcc440e6702 | ||
Version: 0.9.1.dev48+g810a7188.d20180414 | ||
Pushed branches: | ||
- appveyor-win-conda | ||
- travis-linux-conda | ||
- travis-osx-conda | ||
- linux-packages | ||
- conda-linux | ||
- wheel-win | ||
``` | ||
|
||
Run `wheel` builds: | ||
Just render without applying or committing the changes: | ||
|
||
```bash | ||
$ python crossbow.py wheel | ||
Repository: https://github.com/kszucs/arrow@tasks | ||
Commit SHA: 810a718836bb3a8cefc053055600bdcc440e6702 | ||
Version: 0.9.1.dev48+g810a7188.d20180414 | ||
Pushed branches: | ||
- travis-osx-wheel | ||
- travis-linux-wheel | ||
- appveyor-win-wheel | ||
$ python crossbow.py submit --dry-run task_name | ||
``` | ||
|
||
Run `osx` builds: | ||
Run only `conda` package builds but on all platforms: | ||
|
||
```bash | ||
$ python crossbow.py osx | ||
Repository: https://github.com/kszucs/arrow@tasks | ||
Commit SHA: cad1df2c7f650ad3434319bbbefed0d4abe45e4a | ||
Version: 0.9.1.dev130+gcad1df2c.d20180414 | ||
Pushed branches: | ||
- travis-osx-wheel | ||
- travis-osx-conda | ||
$ python crossbow.py submit conda-win conda-osx conda-linux | ||
``` | ||
|
||
Run only `linux-conda` package build: | ||
Run `wheel` builds: | ||
|
||
```bash | ||
$ python crossbow.py linux-conda | ||
Repository: https://github.com/kszucs/arrow@tasks | ||
Commit SHA: 810a718836bb3a8cefc053055600bdcc440e6702 | ||
Version: 0.9.1.dev48+g810a7188.d20180414 | ||
Pushed branches: | ||
- travis-linux-conda | ||
$ python crossbow.py submit wheel-osx wheel-linux wheel-win | ||
``` |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,67 @@ | ||
# Licensed to the Apache Software Foundation (ASF) under one | ||
# or more contributor license agreements. See the NOTICE file | ||
# distributed with this work for additional information | ||
# regarding copyright ownership. The ASF licenses this file | ||
# to you under the Apache License, Version 2.0 (the | ||
# "License"); you may not use this file except in compliance | ||
# with the License. You may obtain a copy of the License at | ||
# | ||
# http://www.apache.org/licenses/LICENSE-2.0 | ||
# | ||
# Unless required by applicable law or agreed to in writing, software | ||
# distributed under the License is distributed on an "AS IS" BASIS, | ||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
# See the License for the specific language governing permissions and | ||
# limitations under the License. | ||
|
||
branches: | ||
# don't attempt to build branches intented for windows builds | ||
except: | ||
- /.*win.*/ | ||
|
||
os: linux | ||
dist: trusty | ||
language: generic | ||
|
||
before_install: | ||
# Install Miniconda. | ||
- echo `pwd` | ||
- | | ||
echo "" | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Any particular reason why we're echoing a newline here? |
||
echo "Installing a fresh version of Miniconda." | ||
MINICONDA_URL="https://repo.continuum.io/miniconda" | ||
MINICONDA_FILE="Miniconda3-latest-Linux-x86_64.sh" | ||
curl -L -O "${MINICONDA_URL}/${MINICONDA_FILE}" | ||
bash $MINICONDA_FILE -b | ||
|
||
# Configure conda. | ||
- | | ||
echo "" | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Any particular reason why we're echoing a newline here? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Copy paste from conda forge. This newline probably makes the output more readable. |
||
echo "Configuring conda." | ||
source /home/travis/miniconda3/bin/activate root | ||
conda config --remove channels defaults | ||
conda config --add channels defaults | ||
conda config --add channels conda-forge | ||
conda config --set show_channel_urls true | ||
|
||
install: | ||
- conda install -y -q jinja2 pygit2 click pyyaml setuptools_scm | ||
|
||
script: | ||
# fetch all branches of crossbow | ||
- git config remote.origin.fetch +refs/heads/*:refs/remotes/origin/* | ||
|
||
# clone arrow with crossbow tool | ||
- pushd .. | ||
- git clone -b {{ ARROW_BRANCH }} {{ ARROW_REPO }} | ||
|
||
# submit packaging tasks | ||
- | | ||
python arrow/dev/tasks/crossbow.py \ | ||
conda-linux \ | ||
conda-win \ | ||
conda-osx \ | ||
wheel-linux \ | ||
wheel-win \ | ||
wheel-osx \ | ||
linux-packages | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I'm not sure about this. I was thinking we would want to schedule nightlies using a cronjob of some kind. Or at least the manifest of nightly jobs would be specified in a YAML file someplace There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This would be just for convenience, to use travis' cron instead of a self hosted one. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This seems like a fine place to keep the nightly jobs list for now. There's nothing preventing us from moving this to a non-travis cron in the future if there's some reason we would need to do that. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
FYI, this is a temporary fix until we can address ARROW-2720. This is fragile if (with
CMAKE_CXX_STANDARD
set to 11)-std=gnu++11
ends up inCMAKE_C_FLAGS
.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is removed in master (I removed it in a patch recently). I think this is a rebase artifact and should be removed
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yep, that removal broke osx builds though. That's why we added it back.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It broke osx wheel and/or conda builds, not CI builds (obviously) though.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
That's super weird, how did that flag end up in
CMAKE_C_FLAGS
? What kind of error did it cause?There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't exactly what's happening, but I know that we are setting
CMAKE_CXX_STANDARD
to11
and then settingsCMAKE_C_FLAGS
toCMAKE_CXX_FLAGS
, which might explain how the std flag is ending up there. However, this doesn't show up on any NIX systems except OSX which is why I'm not 100% sure what's happening.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The error you get is
error: invalid argument '-std=c++11' not allowed with 'C/ObjC'
when theae.c
file is being compiled during the plasma compilation. Without a mac to figure out what's going on, it's pretty hard for me to tell what the heck is happening.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Oh I see. I think gcc and clang just ignore the flag when compiling C code. This suggests we should be setting up the CMAKE_C_FLAGS separate from CXX. I'm opening a JIRA
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
https://issues.apache.org/jira/browse/ARROW-2730
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Great! Thanks.