You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+46
Original file line number
Diff line number
Diff line change
@@ -27,6 +27,52 @@ First, we will run a basic workflow which creates a python environment with a fe
27
27
* go to **Actions** tab, click on **Python Environment**, and click **Run workflow**: this will manually trigger the workflow ([`dispatch_workflow`](https://docs.github.com/en/actions/managing-workflow-runs/manually-running-a-workflow))
28
28
* click on the newly created run to see the execution progress
Next, we will demonstrate how GitHub Actions can be used to display an image in a GitHub README generated by the workflow. In this specific example, the last step of the workflow involves plotting the inverse Laplace transform computed numerically and comparing it with the exact result.
The workflow is triggered by the workflow_dispatch event, allowing manual execution.
38
+
39
+
* Job Configuration:
40
+
The workflow defines a job named test that runs on different operating systems (ubuntu-latest and windows-latest).
41
+
It uses a matrix strategy to vary the operating system and compiler toolchain (GCC, Intel) for testing.
42
+
43
+
* Permissions:
44
+
Permissions are set to allow the default GITHUB_TOKEN to write to the repository's contents.
45
+
46
+
* Steps:
47
+
* a. Checkout Code:
48
+
The code is checked out using the actions/checkout action with submodule support.
49
+
50
+
* b. Get Compiler:
51
+
The Fortran compiler is set up based on the specified compiler and version in the matrix.
52
+
53
+
* c. Setup Fortran Package Manager (FPM):
54
+
FPM is configured using the fortran-lang/setup-fpm action.
55
+
56
+
* d. Run NILP App Test:
57
+
The Fortran compiler version is displayed, and FPM is used to run the NILP app in release mode.
58
+
59
+
* e. Get PNG File:
60
+
This step installs gnuplot on Ubuntu and generates a PNG file using the gnuplot script (nilp.p).
61
+
62
+
* f. Commit:
63
+
A commit is made to the GitHub repository, adding any changed or new PNG files.
64
+
65
+
* g. Upload PNG File:
66
+
PNG files from the png/ directory are uploaded as artifacts named "Graphic."
67
+
68
+
* Conditions:
69
+
The last three steps (get png file, commit, upload png file) are conditional on Ubuntu and GCC in the matrix. They execute only if the operating system is Ubuntu and the compiler is GCC.
70
+
71
+
After the workflow is executed a `nilp.png` file is updated in the repo and is visualized below
These materials are for a course intended to provide a (very) quick introduction to GitHub Actions. The course is aimed at a scientific audience. Comments, corrections, and additions are welcome.
0 commit comments