Skip to content

Commit

Permalink
CI: Simplify Stubs (AMReX-Codes#248)
Browse files Browse the repository at this point in the history
* CI: Simplify Stubs

- always run
- always test result
- only push if in mainline `development` branch

* Update: `actions/checkout@v4`

Update leftover `actions/checkout@v3` usage.
  • Loading branch information
ax3l authored Feb 1, 2024
1 parent 64e1c06 commit 3a72a95
Show file tree
Hide file tree
Showing 10 changed files with 21 additions and 18 deletions.
3 changes: 0 additions & 3 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,15 +9,12 @@ concurrency:
jobs:
stubs:
# Pushes should only run on mainline branch "development"
# TODO: We can also skip this, if the latest commit's name is "Update Stub Files"
if: github.event_name == 'push' && github.repository == 'AMReX-Codes/pyamrex' && github.ref == 'refs/heads/development'
name: 🔄 Update Stub Files
secrets:
PYAMREX_PUSH_TOKEN: ${{ secrets.PYAMREX_PUSH_TOKEN }}
uses: ./.github/workflows/stubs.yml

ubuntu:
if: always() && !contains(needs.*.result, 'failure') && github.event.pull_request.draft == false
name: 🐧 Ubuntu
needs: [stubs]
uses: ./.github/workflows/ubuntu.yml
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/cleanup-cache-postpr.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ jobs:
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- name: Clean up ccahe
run: |
gh extension install actions/gh-actions-cache
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/cleanup-cache.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ jobs:
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- name: Clean up ccahe
run: |
gh extension install actions/gh-actions-cache
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/codeql.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ jobs:

steps:
- name: Checkout
uses: actions/checkout@v3
uses: actions/checkout@v4

- name: Clean Out
run: |
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/hip.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ jobs:
CXXFLAGS: "-Werror -Wno-deprecated-declarations -Wno-error=pass-failed -fno-operator-names"
CMAKE_GENERATOR: Ninja
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- name: install dependencies
shell: bash
run: |
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/intel.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ jobs:
name: oneAPI SYCL 3D
runs-on: ubuntu-20.04
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- name: Dependencies
run: |
.github/workflows/dependencies/dpcpp.sh
Expand Down Expand Up @@ -60,7 +60,7 @@ jobs:
name: ICPX
runs-on: ubuntu-20.04
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- name: Dependencies
run: |
.github/workflows/dependencies/dpcpp.sh
Expand Down Expand Up @@ -117,7 +117,7 @@ jobs:
name: ICC
runs-on: ubuntu-20.04
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- name: install dependencies
run: |
export DEBIAN_FRONTEND=noninteractive
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/macos.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ jobs:
name: [email protected] w/o MPI
runs-on: macos-latest
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- name: Dependencies
run: .github/workflows/dependencies/dependencies_mac.sh
- name: Set Up Cache
Expand Down
6 changes: 6 additions & 0 deletions .github/workflows/stubs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,10 +25,15 @@ jobs:

steps:
- uses: actions/checkout@v4
if: github.event_name != 'push' || github.repository != 'AMReX-Codes/pyamrex' || github.ref != 'refs/heads/development'

- uses: actions/checkout@v4
if: github.event_name == 'push' && github.repository == 'AMReX-Codes/pyamrex' && github.ref == 'refs/heads/development'
with:
token: ${{ secrets.PYAMREX_PUSH_TOKEN }}

- name: Pull Remote Changes
if: github.event_name == 'push' && github.repository == 'AMReX-Codes/pyamrex' && github.ref == 'refs/heads/development'
run: git pull

- uses: actions/setup-python@v4
Expand Down Expand Up @@ -84,5 +89,6 @@ jobs:
- uses: stefanzweifel/git-auto-commit-action@v5
name: Commit Updated Stub Files
if: github.event_name == 'push' && github.repository == 'AMReX-Codes/pyamrex' && github.ref == 'refs/heads/development'
with:
commit_message: Update Stub Files
10 changes: 5 additions & 5 deletions .github/workflows/ubuntu.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ jobs:
CXX: g++-7
CXXFLAGS: "-Werror -Wshadow -Woverloaded-virtual -Wunreachable-code -fno-operator-names -Wno-array-bounds"
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- uses: actions/setup-python@v4
name: Install Python
with:
Expand Down Expand Up @@ -57,7 +57,7 @@ jobs:
runs-on: ubuntu-22.04
env: {CXXFLAGS: "-Werror -Wno-error=deprecated-declarations -Wshadow -Woverloaded-virtual -Wunreachable-code -fno-operator-names"}
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- name: Dependencies
run: |
.github/workflows/dependencies/dependencies_gcc10.sh
Expand Down Expand Up @@ -108,7 +108,7 @@ jobs:
runs-on: ubuntu-20.04
env: {CXXFLAGS: "-Werror -Wshadow -Woverloaded-virtual -Wextra-semi -Wunreachable-code -fno-operator-names -Wno-pass-failed"}
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- name: Dependencies
run: |
.github/workflows/dependencies/dependencies_clang6.sh
Expand Down Expand Up @@ -151,7 +151,7 @@ jobs:
CXX: "clang++"
CC: "clang"
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- name: Dependencies
run: |
.github/workflows/dependencies/dependencies_clang14_libcpp.sh
Expand Down Expand Up @@ -189,7 +189,7 @@ jobs:
runs-on: ubuntu-20.04
env: {CXXFLAGS: "-fno-operator-names"}
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- name: Dependencies
run: |
.github/workflows/dependencies/dependencies_nvcc11.sh
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/windows.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ jobs:
name: MSVC w/o MPI static release
runs-on: windows-latest
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- uses: actions/setup-python@v4
with:
python-version: '3.x'
Expand All @@ -33,7 +33,7 @@ jobs:
name: Clang w/o MPI shared debug
runs-on: windows-latest
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- uses: actions/setup-python@v4
with:
python-version: '3.x'
Expand Down

0 comments on commit 3a72a95

Please sign in to comment.