-
Notifications
You must be signed in to change notification settings - Fork 13
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #20 from lukasmerten/CI
CI / CD
- Loading branch information
Showing
74 changed files
with
331 additions
and
76,632 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
name: Create test archive | ||
|
||
# Controls when the action will run. Workflow runs when manually triggered using the UI | ||
# or API. | ||
on: | ||
push: | ||
branches: [ "master" ] | ||
|
||
# A workflow run is made up of one or more jobs that can run sequentially or in parallel | ||
jobs: | ||
# This workflow contains a single job called "Create_CRPropa_default" | ||
Create_CRPropa_default: | ||
# The type of runner that the job will run on | ||
runs-on: ubuntu-latest | ||
|
||
# Steps represent a sequence of tasks that will be executed as part of the job | ||
steps: | ||
# Checkout the repository | ||
- name: Checkout repository | ||
uses: actions/checkout@v3 | ||
# Python set up | ||
- name: Preinstall | ||
uses: actions/setup-python@v4 | ||
with: | ||
python-version: '3.9' | ||
cache: 'pip' # caching pip dependencies | ||
- name: pip install | ||
run: pip install -r requirements.txt | ||
# Creating the default CRPropa data, compressing and calculating the checksum | ||
- name: Create tabulated data | ||
run: | | ||
python calc_all.py | ||
- name: Archive data | ||
uses: actions/upload-artifact@v3 | ||
with: | ||
name: "crpropa-data" | ||
path: | | ||
data-*.tar.gz | ||
data-*.tar.gz-CHECKSUM |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,77 @@ | ||
# Workflow to test automatic uploading to Sciebo | ||
|
||
name: Upload data | ||
|
||
# Controls when the action will run. Workflow runs when manually triggered using the UI | ||
# or API. | ||
on: | ||
workflow_dispatch: | ||
# Inputs the workflow accepts. | ||
inputs: | ||
name: | ||
# Description to be shown in the UI | ||
description: 'Filename' | ||
# Default value if no value is explicitly provided | ||
default: 'data-YYYY-MM-DD' | ||
# Input has to be provided for the workflow to run | ||
required: true | ||
|
||
# A workflow run is made up of one or more jobs that can run sequentially or in parallel | ||
jobs: | ||
# This workflow contains a single job called "upload" | ||
upload: | ||
# The type of runner that the job will run on | ||
# ubuntu latest should be 22 | ||
runs-on: ubuntu-latest | ||
|
||
# Steps represent a sequence of tasks that will be executed as part of the job | ||
steps: | ||
# Create and Upload a file containing the current date to SCIEBO | ||
- name: Download artifact | ||
id: download-artifact | ||
uses: dawidd6/action-download-artifact@v2 | ||
with: | ||
# Optional, workflow file name or ID | ||
# If not specified, will be inferred from run_id (if run_id is specified), or will be the current workflow | ||
workflow: createTarBall.yml | ||
# Optional, the status or conclusion of a completed workflow to search for | ||
# Can be one of a workflow conclusion: | ||
# "failure", "success", "neutral", "cancelled", "skipped", "timed_out", "action_required" | ||
# Or a workflow status: | ||
# "completed", "in_progress", "queued" | ||
# Use the empty string ("") to ignore status or conclusion in the search | ||
workflow_conclusion: success | ||
# Optional, uploaded artifact name, | ||
# will download all artifacts if not specified | ||
# and extract them into respective subdirectories | ||
# https://github.com/actions/download-artifact#download-all-artifacts | ||
name: crpropa-data | ||
# Optional, check the workflow run to whether it has an artifact | ||
# then will get the last available artifact from the previous workflow | ||
# default false, just try to download from the last one | ||
check_artifacts: false | ||
# Optional, search for the last workflow run whose stored an artifact named as in `name` input | ||
# default false | ||
search_artifacts: false | ||
# Optional, choose to skip unpacking the downloaded artifact(s) | ||
# default false | ||
skip_unpack: false | ||
# Optional, choose how to exit the action if no artifact is found | ||
# can be one of: | ||
# "fail", "warn", "ignore" | ||
# default fail | ||
if_no_artifact_found: fail | ||
|
||
- name: Display structure of downloaded files | ||
run: ls -R | ||
|
||
- name: Upload to sciebo | ||
shell: bash | ||
run: | | ||
curl -u "$SCIEBO_USR:$SCIEBO_PWD" -T "${{ github.event.inputs.name }}.tar.gz" "https://ruhr-uni-bochum.sciebo.de/public.php/webdav/${{ github.event.inputs.name }}.tar.gz" | ||
curl -u "$SCIEBO_USR:$SCIEBO_PWD" -T "${{ github.event.inputs.name }}.tar.gz-CHECKSUM" "https://ruhr-uni-bochum.sciebo.de/public.php/webdav/${{ github.event.inputs.name }}.tar.gz-CHECKSUM" | ||
env: | ||
# Login credentials are stored as encrypted secrets in the repository settings on github. | ||
SCIEBO_USR: ${{ secrets.SCIEBO_CRPDATA_USR }} | ||
SCIEBO_PWD: ${{ secrets.SCIEBO_CRPDATA_PWD}} | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,9 @@ | ||
*.pyc | ||
*.tar.gz | ||
*.tar.gz* | ||
|
||
plots/ | ||
temp/ | ||
|
||
data/ | ||
!data/CustomPhotonField/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.