Skip to content
This repository has been archived by the owner on Jan 5, 2024. It is now read-only.

Commit

Permalink
refactor: schedule warning outages, drop branch filters from push tri…
Browse files Browse the repository at this point in the history
…gger
  • Loading branch information
wpbonelli committed Oct 19, 2023
1 parent 45b618d commit fb4e223
Show file tree
Hide file tree
Showing 4 changed files with 26 additions and 10 deletions.
5 changes: 2 additions & 3 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -1,9 +1,6 @@
name: CI
on:
push:
branches:
- main
- develop*
paths-ignore:
- '**.md'
pull_request:
Expand Down Expand Up @@ -67,12 +64,14 @@ jobs:
with:
path: ${{ env.TEST_BINDIR }}
setvars: ${{ matrix.setvars }}
ignore: true

- name: Install compilers
if: matrix.path == 'default'
uses: ./
with:
setvars: ${{ matrix.setvars }}
ignore: true

- name: Set environment variables
if: runner.os != 'Windows' && matrix.setvars != 'true'
Expand Down
5 changes: 2 additions & 3 deletions .github/workflows/integration.yml
Original file line number Diff line number Diff line change
@@ -1,9 +1,6 @@
name: Integration testing
on:
push:
branches:
- main
- develop*
paths-ignore:
- '**.md'
pull_request:
Expand Down Expand Up @@ -70,6 +67,7 @@ jobs:
uses: ./
with:
path: ${{ runner.os != 'Windows' && 'bin' || 'C:\Program Files (x86)\Intel\oneAPI' }}
ignore: true

- name: Build modflow6 (Linux & Mac)
if: runner.os != 'Windows' && matrix.env == 'pip'
Expand Down Expand Up @@ -171,6 +169,7 @@ jobs:
uses: ./
with:
path: ${{ runner.os != 'Windows' && 'bin' || 'C:\Program Files (x86)\Intel\oneAPI' }}
ignore: true

- name: Download examples
working-directory: pymake
Expand Down
9 changes: 8 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,12 @@

An action to install and cache [Intel OneAPI](https://www.intel.com/content/www/us/en/developer/tools/oneapi/fortran-compiler.html#gs.bksc2p) Fortran and C/C++ compilers via the [HPC Toolkit](https://www.intel.com/content/www/us/en/developer/tools/oneapi/hpc-toolkit.html#gs.g10hgy).

**Note:** [`awvwgk/setup-fortran`](https://github.com/awvwgk/setup-fortran) is recommended. Maintenance of this action will cease in 2024.
**Note:** Maintenance of this action will cease in 2024. [`fortran-lang/setup-fortran`](https://github.com/fortran-lang/setup-fortran) is recommended instead. This action will disable itself 10% of the time until then — set `ignore: true` to avoid this.

<!-- START doctoc generated TOC please keep comment here to allow auto update -->
<!-- DON'T EDIT THIS SECTION, INSTEAD RE-RUN doctoc TO UPDATE -->


- [Overview](#overview)
- [Usage](#usage)
- [Environment variables](#environment-variables)
Expand All @@ -20,6 +21,7 @@ An action to install and cache [Intel OneAPI](https://www.intel.com/content/www/
- [Setting oneAPI variables on Linux/macOS](#setting-oneapi-variables-on-linuxmacos)
- [Setting oneAPI variables on Windows](#setting-oneapi-variables-on-windows)
- [`cache`](#cache)
- [`ignore`](#ignore)
- [Outputs](#outputs)
- [`cache-hit`](#cache-hit)
- [Windows caveats](#windows-caveats)
Expand Down Expand Up @@ -67,6 +69,7 @@ Besides oneAPI environment variables configured by `setvars` scripts (whose name
- `path`
- `setvars`
- `cache`
- `ignore`

### `path`

Expand Down Expand Up @@ -106,6 +109,10 @@ The `cache` input is a boolean that controls whether the action caches the oneAP

**Note:** installation on Windows can take a long time (~30 minutes) so caching is recommended, however an [outstanding cache reservation bug in `actions/cache`](https://github.com/actions/cache/issues/144) can cause the cache to [fail to restore while simultaneously rejecting new saves](https://github.com/MODFLOW-USGS/modflow6/actions/runs/3624583228/jobs/6111766806#step:6:152). The [GitHub-endorsed workaround for this issue](https://github.com/actions/cache/issues/144#issuecomment-579323937) is currently to change keys, so this action rotates the cache key once daily. You may want to run a job in the early hours of the morning to warm up the cache on your repository's default branch, so PR/feature branches can restore from it throughout the day.

### `ignore`

Set to `true` to disable impending archival warning brownouts. The default is `false`.

## Outputs

The action has the following outputs:
Expand Down
17 changes: 14 additions & 3 deletions action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,10 @@ inputs:
description: Whether to cache the installation
required: false
default: 'true'
ignore:
description: Whether to disable archival/migration brownouts
required: false
default: 'false'
outputs:
cache-hit:
description: Whether the installation was restored from cache
Expand All @@ -21,11 +25,18 @@ runs:
using: composite
steps:

- name: Deprecation warning
- name: Migration warning
shell: bash
run: |
echo "WARNING: This action will be archived on 01/01/24 in light of better alternatives."
echo "Please use awvwgk/setup-fortran instead (https://github.com/awvwgk/setup-fortran)."
echo "WARNING: This action will be archived on 01/01/24."
echo "Use fortran-lang/setup-fortran instead (https://github.com/fortran-lang/setup-fortran)."
- name: Migration brownout
if: inputs.ignore == 'false'
uses: wpbonelli/schedule-outage@v1
with:
probability: 0.1
message: "This action will be archived on 01/01/24. Use fortran-lang/setup-fortran instead (https://github.com/fortran-lang/setup-fortran)."

- name: Set install path
if: runner.os != 'Windows'
Expand Down

0 comments on commit fb4e223

Please sign in to comment.