Unverified Commit 9388b2ec authored by Nikita Titov's avatar Nikita Titov Committed by GitHub
Browse files

[ci] use GitHub Actions to re-generate R configure (#4140)



* use GitHub Actions to re-generate R configure

* Update R-package/README.md
Co-authored-by: default avatarJames Lamb <jaylamb20@gmail.com>
Co-authored-by: default avatarJames Lamb <jaylamb20@gmail.com>
parent 593aef3c
name: R generate configure
on:
repository_dispatch:
types: [gha_run_r_configure]
jobs:
r-configure:
name: r-configure
timeout-minutes: 60
runs-on: ubuntu-latest
container: "ubuntu:20.04"
steps:
- name: Install essential software before checkout
run: |
apt-get update
apt-get install --no-install-recommends -y \
ca-certificates \
git
- name: Checkout repository
uses: actions/checkout@v2.3.4
with:
fetch-depth: 5
submodules: true
repository: microsoft/LightGBM
ref: "refs/heads/${{ fromJSON(github.event.client_payload.pr_branch) }}"
token: ${{ secrets.WORKFLOW }}
persist-credentials: true
- name: Update configure
shell: bash
run: ./R-package/recreate-configure.sh || exit -1
- name: Push changes
run: |
git config --global user.name "GitHub Actions Bot"
git config --global user.email "githubactionsbot@users.noreply.github.com"
git add "./R-package/configure"
git commit --allow-empty -m "Auto-update configure"
git push
...@@ -32,3 +32,11 @@ jobs: ...@@ -32,3 +32,11 @@ jobs:
"${{ github.event.issue.pull_request.url }}" \ "${{ github.event.issue.pull_request.url }}" \
"${{ github.event.comment.id }}" \ "${{ github.event.comment.id }}" \
"gha_run_r_solaris" "gha_run_r_solaris"
- name: Trigger update R configure
if: github.event.comment.body == '/gha run r-configure'
run: |
$GITHUB_WORKSPACE/.ci/trigger_dispatch_run.sh \
"${{ github.event.issue.pull_request.url }}" \
"${{ github.event.comment.id }}" \
"gha_run_r_configure"
...@@ -308,6 +308,10 @@ At build time, `configure` will be run and used to create a file `Makevars`, usi ...@@ -308,6 +308,10 @@ At build time, `configure` will be run and used to create a file `Makevars`, usi
3. Edit `src/Makevars.in`. 3. Edit `src/Makevars.in`.
Alternatively, GitHub Actions can re-generate this file for you. On a pull request (only on internal one, does not work for ones from forks), create a comment with this phrase:
> /gha run r-configure
**Configuring for Windows** **Configuring for Windows**
At build time, `configure.win` will be run and used to create a file `Makevars.win`, using `Makevars.win.in` as a template. At build time, `configure.win` will be run and used to create a file `Makevars.win`, using `Makevars.win.in` as a template.
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment