diff --git a/dev/tasks/autotune/github.linux.yml b/dev/tasks/autotune/github.linux.yml new file mode 100644 index 00000000000..cb3368839cf --- /dev/null +++ b/dev/tasks/autotune/github.linux.yml @@ -0,0 +1,68 @@ +# 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. + +# NOTE: must set "Crossbow" as name to have the badge links working in the +# github comment reports! +name: Crossbow + +on: + push: + branches: + - "*-github-*" + +jobs: + verify: + name: "Fix all the things" + runs-on: ubuntu-latest + steps: + - name: Checkout Arrow + env: + CROSSBOW_GITHUB_TOKEN: {{ '${{ secrets.CROSSBOW_GITHUB_TOKEN }}' }} + run: | + REMOTE=`echo "{{ arrow.remote }}" | sed -e 's/github.com/x-access-token:'"$CROSSBOW_GITHUB_TOKEN"'@github.com'` + git clone --no-checkout "$REMOTE" arrow + git -C arrow fetch -t "$REMOTE" {{ arrow.branch }} + git -C arrow checkout {{ arrow.branch }} + git -C arrow submodule update --init --recursive + - name: See what is different + run: | + set -ex + cd arrow + changed() { + git diff --name-only HEAD^.. | grep -e "$1" >/dev/null 2>&1 + } + if changed '^r/.*\.R$'; then + echo ".R changed" + echo "::set-env name=R_DOCS::true" + fi + - uses: r-lib/actions/setup-r@v1 + if: env.R_DOCS == 'true' + - name: Update R docs + if: env.R_DOCS == 'true' + shell: Rscript + run: | + source("arrow/ci/etc/rprofile") + install.packages(c("remotes", "roxygen2")) + remotes::install_deps("arrow/r") + roxygen2::roxygenize("arrow/r") + - name: Commit results + run: | + cd arrow + git config user.name "$(git log -1 --pretty=format:%an)" + git config user.email "$(git log -1 --pretty=format:%ae)" + git commit -a -m 'Fix all the things [automated commit]' || echo "No changes to commit" + git push origin {{ arrow.branch }} || echo "No changes to commit" diff --git a/dev/tasks/tasks.yml b/dev/tasks/tasks.yml index d3373a0d3ff..a13b2190b90 100644 --- a/dev/tasks/tasks.yml +++ b/dev/tasks/tasks.yml @@ -2157,3 +2157,10 @@ tasks: - conda-cpp-hiveserver2 run: - conda-cpp-hiveserver2 + + ############################## Miscellaneous ############################ + + autotune: + ci: github + platform: linux + template: autotune/github.linux.yml