Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .envrc.example
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
use flake
15 changes: 15 additions & 0 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,3 +10,18 @@ jobs:
- uses: actions/checkout@v6
- uses: luizm/action-sh-checker@883217215b11c1fabbf00eb1a9a041f62d74c744
env: { SHFMT_OPTS: -i 2 -d }

check-actions:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v6
- run: |
set -eu
npm ci
# Run all of the tests.
npm run test
# Ensure the dist directories are up-to-date:
npm run build
git diff --exit-code
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
/.envrc
/node_modules/
32 changes: 32 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -1 +1,33 @@
# OpenMS CI Tools

Scripts used in the OpenMS CI/CD system.

## Actions

To build the actions:

```sh
npm ci
npm run build
```

### Cache via rsync

Push/pull a directory via rsync.

To use, put something like this in your workflow YAML:

```yml
- uses: OpenMS/ci-tools/actions/rsync-cache@XXXX
with:
name: vcpkg-cache
path: ${{ github.workspace }}/.vcpkg-cache
key: ${{ runner.os }}-${{ runner.arch }}-${{ matrix.compiler }}
ssh_key: ${{ secrets.ARCHIVE_RRSYNC_SSH }}
ssh_host: ${{ secrets.ARCHIVE_RRSYNC_HOST }}
ssh_port: ${{ secrets.ARCHIVE_RRSYNC_PORT }}
ssh_user: ${{ secrets.ARCHIVE_RRSYNC_USER }}
```

NOTE: If the `ssh_key` is not available the action will automatically
disable itself and print a notice to the workflow output.
29 changes: 29 additions & 0 deletions actions/rsync-cache/action.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
name: "Cache via rsync"
description: "Cache a directory to a private server using rsync"
inputs:
name:
description: "A name to use for the sub-directory on the remote server"
required: true
path:
description: "An absolute path to a directory that should be cached"
required: true
key:
description: "A cache key, which is essentially a sub-directory name on the remote server"
required: true
ssh_key:
description: "The contents of an SSH private key"
required: false
ssh_host:
description: "The host name of the remote server"
required: true
ssh_port:
description: "The port to use for SSH"
required: false
ssh_user:
description: "The remote SSH user"
required: true
runs:
using: 'node24'
main: dist/restore.js
post: dist/commit.js
post-if: "success()"
Loading