Skip to content

Commit

Permalink
test install on push to main
Browse files Browse the repository at this point in the history
  • Loading branch information
j-i-l committed Jul 14, 2024
1 parent 616ce66 commit a0b1459
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 168 deletions.
45 changes: 3 additions & 42 deletions .github/workflows/onlabel_Fedora_setup.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,13 +3,11 @@
name: Fedora Install

on:
pull_request:
types: [ labeled ]
push:
branches:
- "main"

env:
LABEL_CHECK: 'fedoraInstall::check'
LABEL_SUCCESS: 'fedoraInstall::passed'
LABEL_FAILURE: 'fedoraInstall::failed'
JAGS: '4.3.2'
BUILD_LOC: "./build"
BRANCH: ${{ github.head_ref || github.ref_name }}
Expand Down Expand Up @@ -125,40 +123,3 @@ jobs:
devtools::build(pkg = '.', path = '${{ env.BUILD_LOC }}/abn.tar.gz', vignettes = FALSE)
install.packages('${{ env.BUILD_LOC }}/abn.tar.gz', repos=NULL, type="source")
shell: Rscript {0}

report_Fedora_setup:
if: ${{ (success() || failure()) }}
needs:
- setup-and-install
runs-on: ubuntu-latest
permissions:
contents: write
pull-requests: write
repository-projects: write
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
OWNER: ${{ github.repository_owner }}
REPO: ${{ github.event.repository.name }}
steps:
- uses: actions/checkout@v4
- name: Check if on demand tasks succeeded
run: |
gh pr edit ${{ env.EVENT }} --remove-label ${{ env.LABEL_CHECK }} --repo ${{ env.OWNER }}/${{ env.REPO }}
if [ ${{ needs.setup-and-install.result }} == "success" ]; then
gh pr edit ${{ env.EVENT }} --remove-label ${{ env.LABEL_FAILURE }} --repo ${{ env.OWNER }}/${{ env.REPO }}
gh pr edit ${{ env.EVENT }} --add-label ${{ env.LABEL_SUCCESS }} --repo ${{ env.OWNER }}/${{ env.REPO }}
echo "### ${{ github.event.label.url }} passed! :rocket:" >> $GITHUB_STEP_SUMMARY
exit 0
elif [ ${{ needs.setup-and-install.result }} == "failure" ]; then
gh pr edit ${{ env.EVENT }} --remove-label ${{ env.LABEL_SUCCESS }} --repo ${{ env.OWNER }}/${{ env.REPO }}
gh pr edit ${{ env.EVENT }} --add-label ${{ env.LABEL_FAILURE }} --repo ${{ env.OWNER }}/${{ env.REPO }}
echo "### ${{ github.event.label.url }} failed!" >> $GITHUB_STEP_SUMMARY
exit 1
else
gh pr edit ${{ env.EVENT }} --add-label ${{ env.LABEL_CHECK }} --repo ${{ env.OWNER }}/${{ env.REPO }}
echo "On demand task outcome was ${{ needs.setup-and-installoutcome }}"
fi
shell: bash
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
EVENT: ${{ github.event.number }} # This is either the issue or pr
45 changes: 3 additions & 42 deletions .github/workflows/onlabel_Macos_setup.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,13 +3,11 @@
name: Macos Install

on:
pull_request:
types: [ labeled ]
push:
branches:
- "main"

env:
LABEL_CHECK: 'macosInstall::check'
LABEL_SUCCESS: 'macosInstall::passed'
LABEL_FAILURE: 'macosInstall::failed'
BUILD_LOC: "./build"
BRANCH: ${{ github.head_ref || github.ref_name }}

Expand Down Expand Up @@ -95,40 +93,3 @@ jobs:
devtools::build(pkg = '.', path = '${{ env.BUILD_LOC }}/abn.tar.gz', vignettes = FALSE)
install.packages('${{ env.BUILD_LOC }}/abn.tar.gz', repos=NULL, type="source")
shell: Rscript {0}

report_Macos_setup:
if: ${{ (success() || failure()) }}
needs:
- setup-and-install
runs-on: ubuntu-latest
permissions:
contents: write
pull-requests: write
repository-projects: write
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
OWNER: ${{ github.repository_owner }}
REPO: ${{ github.event.repository.name }}
steps:
- uses: actions/checkout@v4
- name: Check if on demand tasks succeeded
run: |
gh pr edit ${{ env.EVENT }} --remove-label ${{ env.LABEL_CHECK }} --repo ${{ env.OWNER }}/${{ env.REPO }}
if [ ${{ needs.setup-and-install.result }} == "success" ]; then
gh pr edit ${{ env.EVENT }} --remove-label ${{ env.LABEL_FAILURE }} --repo ${{ env.OWNER }}/${{ env.REPO }}
gh pr edit ${{ env.EVENT }} --add-label ${{ env.LABEL_SUCCESS }} --repo ${{ env.OWNER }}/${{ env.REPO }}
echo "### ${{ github.event.label.url }} passed! :rocket:" >> $GITHUB_STEP_SUMMARY
exit 0
elif [ ${{ needs.setup-and-install.result }} == "failure" ]; then
gh pr edit ${{ env.EVENT }} --remove-label ${{ env.LABEL_SUCCESS }} --repo ${{ env.OWNER }}/${{ env.REPO }}
gh pr edit ${{ env.EVENT }} --add-label ${{ env.LABEL_FAILURE }} --repo ${{ env.OWNER }}/${{ env.REPO }}
echo "### ${{ github.event.label.url }} failed!" >> $GITHUB_STEP_SUMMARY
exit 1
else
gh pr edit ${{ env.EVENT }} --add-label ${{ env.LABEL_CHECK }} --repo ${{ env.OWNER }}/${{ env.REPO }}
echo "On demand task outcome was ${{ needs.setup-and-install.outcome }}"
fi
shell: bash
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
EVENT: ${{ github.event.number }} # This is either the issue or pr
45 changes: 3 additions & 42 deletions .github/workflows/onlabel_Ubuntu_setup.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,13 +3,11 @@
name: Ubuntu Install

on:
pull_request:
types: [ labeled ]
push:
branches:
- "main"

env:
LABEL_CHECK: 'ubuntuInstall::check'
LABEL_SUCCESS: 'ubuntuInstall::passed'
LABEL_FAILURE: 'ubuntuInstall::failed'
JAGS: '4.3.2'
BUILD_LOC: "./build"
BRANCH: ${{ github.head_ref || github.ref_name }}
Expand Down Expand Up @@ -114,40 +112,3 @@ jobs:
devtools::build(pkg = '.', path = '${{ env.BUILD_LOC }}/abn.tar.gz', vignettes = FALSE)
install.packages('${{ env.BUILD_LOC }}/abn.tar.gz', repos=NULL, type="source")
shell: Rscript {0}

report_Ubuntu_setup:
if: ${{ (success() || failure()) }}
needs:
- setup-and-install
runs-on: ubuntu-latest
permissions:
contents: write
pull-requests: write
repository-projects: write
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
OWNER: ${{ github.repository_owner }}
REPO: ${{ github.event.repository.name }}
steps:
- uses: actions/checkout@v4
- name: Check if on demand tasks succeeded
run: |
gh pr edit ${{ env.EVENT }} --remove-label ${{ env.LABEL_CHECK }} --repo ${{ env.OWNER }}/${{ env.REPO }}
if [ ${{ needs.setup-and-install.result }} == "success" ]; then
gh pr edit ${{ env.EVENT }} --remove-label ${{ env.LABEL_FAILURE }} --repo ${{ env.OWNER }}/${{ env.REPO }}
gh pr edit ${{ env.EVENT }} --add-label ${{ env.LABEL_SUCCESS }} --repo ${{ env.OWNER }}/${{ env.REPO }}
echo "### ${{ github.event.label.url }} passed! :rocket:" >> $GITHUB_STEP_SUMMARY
exit 0
elif [ ${{ needs.setup-and-install.result }} == "failure" ]; then
gh pr edit ${{ env.EVENT }} --remove-label ${{ env.LABEL_SUCCESS }} --repo ${{ env.OWNER }}/${{ env.REPO }}
gh pr edit ${{ env.EVENT }} --add-label ${{ env.LABEL_FAILURE }} --repo ${{ env.OWNER }}/${{ env.REPO }}
echo "### ${{ github.event.label.url }} failed!" >> $GITHUB_STEP_SUMMARY
exit 1
else
gh pr edit ${{ env.EVENT }} --add-label ${{ env.LABEL_CHECK }} --repo ${{ env.OWNER }}/${{ env.REPO }}
echo "On demand task outcome was ${{ needs.setup-and-installoutcome }}"
fi
shell: bash
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
EVENT: ${{ github.event.number }} # This is either the issue or pr
45 changes: 3 additions & 42 deletions .github/workflows/onlabel_Windows_setup.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,13 +3,11 @@
name: Windows Install

on:
pull_request:
types: [ labeled ]
push:
branches:
- "main"

env:
LABEL_CHECK: 'windowsInstall::check'
LABEL_SUCCESS: 'windowsInstall::passed'
LABEL_FAILURE: 'windowsInstall::failed'
BUILD_LOC: "./build"
BRANCH: ${{ github.head_ref || github.ref_name }}
JAGS_MAJORV: '4'
Expand Down Expand Up @@ -97,40 +95,3 @@ jobs:
devtools::build(pkg = '.', path = '${{ env.BUILD_LOC }}/abn.tar.gz', vignettes = FALSE)
install.packages('${{ env.BUILD_LOC }}/abn.tar.gz', repos=NULL, type="source")
shell: Rscript {0}

report_Windows_setup:
if: ${{ (success() || failure()) }}
needs:
- setup-and-install
runs-on: ubuntu-latest
permissions:
contents: write
pull-requests: write
repository-projects: write
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
OWNER: ${{ github.repository_owner }}
REPO: ${{ github.event.repository.name }}
steps:
- uses: actions/checkout@v4
- name: Check if on demand tasks succeeded
run: |
gh pr edit ${{ env.EVENT }} --remove-label ${{ env.LABEL_CHECK }} --repo ${{ env.OWNER }}/${{ env.REPO }}
if [ ${{ needs.setup-and-install.result }} == "success" ]; then
gh pr edit ${{ env.EVENT }} --remove-label ${{ env.LABEL_FAILURE }} --repo ${{ env.OWNER }}/${{ env.REPO }}
gh pr edit ${{ env.EVENT }} --add-label ${{ env.LABEL_SUCCESS }} --repo ${{ env.OWNER }}/${{ env.REPO }}
echo "### ${{ github.event.label.url }} passed! :rocket:" >> $GITHUB_STEP_SUMMARY
exit 0
elif [ ${{ needs.setup-and-install.result }} == "failure" ]; then
gh pr edit ${{ env.EVENT }} --remove-label ${{ env.LABEL_SUCCESS }} --repo ${{ env.OWNER }}/${{ env.REPO }}
gh pr edit ${{ env.EVENT }} --add-label ${{ env.LABEL_FAILURE }} --repo ${{ env.OWNER }}/${{ env.REPO }}
echo "### ${{ github.event.label.url }} failed!" >> $GITHUB_STEP_SUMMARY
exit 1
else
gh pr edit ${{ env.EVENT }} --add-label ${{ env.LABEL_CHECK }} --repo ${{ env.OWNER }}/${{ env.REPO }}
echo "On demand task outcome was ${{ needs.setup-and-install.outcome }}"
fi
shell: bash
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
EVENT: ${{ github.event.number }} # This is either the issue or pr

0 comments on commit a0b1459

Please sign in to comment.