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
+24-21Lines changed: 24 additions & 21 deletions
Original file line number
Diff line number
Diff line change
@@ -11,11 +11,11 @@ These shared libraries are suitable for linking into external programs, and can
11
11
12
12
Click the **Use this template** button above the file listing view:
13
13
14
-
_[[image]]_
14
+

15
15
16
16
Enter a name for your new repository and click **Create repository from template**:
17
17
18
-
_[[image]]_
18
+

19
19
20
20
This will copy the contents of the template repository, including the GitHub Actions configuration and this README.md file, into a new repository in your account (or the selected organization account).
21
21
@@ -38,28 +38,31 @@ Creating an entitlement requires access to the Wolfram Language.
38
38
If you do not have [Wolfram Mathematica](https://www.wolfram.com/mathematica/), a [Wolfram|One](https://www.wolfram.com/wolfram-one/) subscription or another Wolfram Language product, you can sign up for a free [Wolfram Cloud Basic](https://www.wolframcloud.com/) subscription and create an entitlement from within a cloud notebook.
39
39
40
40
Use the [`CreateLicenseEntitlement` function](https://reference.wolfram.com/language/ref/CreateLicenseEntitlement.html) to create a new license entitlement linked to your Wolfram Account:
Take note of the returned entitlement ID (`O-WSTD-DA42-GKX4Z6NR2DSZR` above); you will need it in the next step.
59
62
60
63
The meanings of the specified entitlement settings are:
61
64
-`"StandardKernelLimit" -> 6`: Up to six kernels may run concurrently. (This means two copies of the three-OS compilation workflow.)
62
-
-`"LicenseExpiration" -> Quantity[1, "Hours"]`: Each kernel may run for up to one hour.
65
+
-`"LicenseExpiration" -> Quantity[1, "Hours"]`: Each kernel may run for up to one hour at a time.
63
66
-`"EntitlementExpiration" -> Quantity[1, "Years"]`: The entitlement expires one year after creation. (This means you must create a new entitlement and replace the GitHub secret once a year.)
64
67
65
68
You may adjust these settings as needed for your use case. For more information, see the documentation for [`CreateLicenseEntitlement`](https://reference.wolfram.com/language/ref/CreateLicenseEntitlement.html).
@@ -73,13 +76,13 @@ This would involve modifying the jobs in the [workflow file](.github/workflows/c
73
76
A license entitlement ID is a form of license key, and so for reasons of security should not be stored directly in the source tree of a repository, especially if that repository is public.
74
77
We will instead store it in an [encrypted repository secret](https://docs.github.com/en/actions/reference/encrypted-secrets) that can be accessed by code running in GitHub Actions jobs.
75
78
76
-
Open the **Actions secrets** repository settings page (Settings > Secrets > Actions) and click **New repository secret**:
79
+
Open the **Actions secrets** repository settings page (**Settings > Secrets > Actions**) and click **New repository secret**:
77
80
78
-
_[[image]]_
81
+

79
82
80
83
Name the new secret `WOLFRAM_LICENSE_ENTITLEMENT_ID` and paste your entitlement ID from step 2 as the value, then click **Add secret**:
81
84
82
-
_[[image]]_
85
+

83
86
84
87
Make sure to remove any extraneous whitespace from either side of the entitlement ID.
85
88
@@ -92,13 +95,13 @@ Files in subdirectories of `/functions` (e.g. `/functions/subdir/file.wl`) are i
92
95
93
96
Each function source file (e.g. [`/functions/addone.wl`](functions/addone.wl)) should return a [`Function`](https://reference.wolfram.com/language/ref/Function.html) expression with the appropriate [type annotations](https://reference.wolfram.com/language/ref/Typed.html) for compilation with [`FunctionCompile`](https://reference.wolfram.com/language/ref/FunctionCompile.html)/[`FunctionCompileExportLibrary`](https://reference.wolfram.com/language/ref/FunctionCompileExportLibrary.html).
94
97
95
-
You can commit a new function source file to your repository using the [Git command-line interface](https://docs.github.com/en/github/managing-files-in-a-repository/adding-a-file-to-a-repository-using-the-command-line) or a graphical Git tool like [GitHub Desktop](https://desktop.github.com/),
98
+
You can commit and push a new function source file to your repository using the [Git command-line interface](https://docs.github.com/en/github/managing-files-in-a-repository/adding-a-file-to-a-repository-using-the-command-line) or a graphical Git tool like [GitHub Desktop](https://desktop.github.com/),
96
99
or you can use [the GitHub web interface](https://docs.github.com/en/github/managing-files-in-a-repository/creating-new-files).
97
100
The web interface is the easiest option for a quick test of your newly configured repository.
98
101
99
-
Navigate to the [`/functions`](functions) directory and click **Add file > Create new file**:
102
+
Navigate to the [`/functions`](functions) directory listing and click **Add file > Create new file**:
100
103
101
-
_[[image]]_
104
+

102
105
103
106
Name the file `power.wl` and paste the following as its contents:
104
107
```wl
@@ -107,23 +110,23 @@ Function[Typed[num, "MachineInteger"], num ^ num]
107
110
108
111
Optionally edit the commit message, and then click **Commit new file**:
109
112
110
-
_[[image]]_
113
+
!["Commit new file" screen showing new file named "power.wl" with "Function[...]" as contents](.github/images/6-Commit-new-file.png)
111
114
112
115
113
116
### 5. Download and use a compiled function library
114
117
115
118
If you switch to the **Actions** tab, you should see the new workflow run triggered by your commit in step 4:
116
119
117
-
_[[image]]_
120
+

118
121
119
122
Click on the run to see the status of each job in the run:
120
123
121
-
_[[image]]_
124
+

122
125
123
126
This initial run may take 10-15 minutes to finish.
124
127
Once all jobs succeed, the produced artifacts will be displayed beneath the list of jobs:
125
128
126
-
_[[image]]_
129
+

127
130
128
131
Each artifact is a compressed ZIP file containing the compiled function libraries for the platform indicated in its name.
129
132
Download and uncompress the artifact for your platform of choice.
0 commit comments