Skip to content

Commit d72c292

Browse files
committed
Misc build fixes
1 parent 2bf232c commit d72c292

File tree

4 files changed

+19
-43
lines changed

4 files changed

+19
-43
lines changed

.github/workflows/Build.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ jobs:
4444
unzip -o /tmp/ResourceSystem.zip -d Assets/Snippets/Streamable/ResourceSystem
4545
4646
- name: Build
47-
run: wolframscript -f Scripts/BuildPaclet.wls
47+
run: wolframscript -f Scripts/BuildPaclet.wls --snippets=false
4848

4949
- name: Upload Artifact
5050
uses: actions/upload-artifact@v4

.github/workflows/ExperimentalRelease.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ jobs:
3434
apt-get update && apt-get install software-properties-common -y
3535
add-apt-repository ppa:git-core/ppa -y
3636
apt-get update && apt-get install git -y
37-
wget ${{ env.GH_INSTALL_URL }} -O gh.deb
37+
curl -fsSL ${{ env.GH_INSTALL_URL }} -o gh.deb
3838
dpkg -i gh.deb
3939
4040
- name: Checkout
@@ -51,7 +51,7 @@ jobs:
5151
unzip -o /tmp/ResourceSystem.zip -d Assets/Snippets/Streamable/ResourceSystem
5252
5353
- name: Build Paclet
54-
run: wolframscript -f Scripts/BuildPaclet.wls
54+
run: wolframscript -f Scripts/BuildPaclet.wls --snippets=false
5555

5656
- name: Rename Paclet File
5757
run: mv "${{ env.PACLET_PATH }}" "${{ env.PACLET_BUILD_DIR }}/Wolfram__Chatbook.paclet"

.github/workflows/Release.yml

Lines changed: 13 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ jobs:
4444
unzip -o /tmp/ResourceSystem.zip -d Assets/Snippets/Streamable/ResourceSystem
4545
4646
- name: Build
47-
run: wolframscript -f Scripts/BuildPaclet.wls --check=true
47+
run: wolframscript -f Scripts/BuildPaclet.wls --check=true --snippets=false
4848

4949
- name: InstallTestDependencies
5050
run: |
@@ -74,14 +74,24 @@ jobs:
7474
apt-get update && apt-get install software-properties-common -y
7575
add-apt-repository ppa:git-core/ppa -y
7676
apt-get update && apt-get install git -y
77-
wget ${{ env.GH_INSTALL_URL }} -O gh.deb
77+
curl -fsSL ${{ env.GH_INSTALL_URL }} -o gh.deb
7878
dpkg -i gh.deb
7979
8080
- name: Checkout
8181
uses: actions/checkout@v4
8282

83+
- name: Download Snippets
84+
run: |
85+
apt-get update && apt-get install -y unzip
86+
mkdir -p Assets/Snippets/Streamable/Documentation
87+
mkdir -p Assets/Snippets/Streamable/ResourceSystem
88+
curl -L -o /tmp/Documentation.zip "https://www.wolframcloud.com/obj/wolframai-content/StreamableSnippets/Documentation/14-3-0-11967661.zip"
89+
curl -L -o /tmp/ResourceSystem.zip "https://www.wolframcloud.com/obj/wolframai-content/StreamableSnippets/ResourceSystem/1-0-0.zip"
90+
unzip -o /tmp/Documentation.zip -d Assets/Snippets/Streamable/Documentation
91+
unzip -o /tmp/ResourceSystem.zip -d Assets/Snippets/Streamable/ResourceSystem
92+
8393
- name: Build
84-
run: wolframscript -f Scripts/BuildPaclet.wls --check=false
94+
run: wolframscript -f Scripts/BuildPaclet.wls --check=false --snippets=false
8595

8696
- name: CreateRelease
8797
env:

Scripts/BuildPaclet.wls

Lines changed: 3 additions & 37 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,6 @@ BeginPackage[ "Wolfram`ChatbookScripts`" ];
77
(*Initialization*)
88
If[ ! TrueQ @ $loadedDefinitions, Get @ FileNameJoin @ { DirectoryName @ $InputFileName, "Common.wl" } ];
99
If[ ! StringQ @ Environment[ "GITHUB_ACTIONS" ], System`$PublisherID = "Wolfram" ];
10-
Needs[ "Wolfram`PacletCICD`" -> "cicd`" ];
1110

1211
(* ::**************************************************************************************************************:: *)
1312
(* ::Subsection::Closed:: *)
@@ -16,7 +15,7 @@ $check = getBooleanArgument[ { "c", "check" }, True ];
1615
$install = getBooleanArgument[ { "i", "install" }, False ];
1716
$mx = getBooleanArgument[ { "m", "mx" }, True ];
1817
$unformat = getBooleanArgument[ { "u", "unformat" }, True ];
19-
$download = getBooleanArgument[ { "s", "snippets" }, False ];
18+
$download = getBooleanArgument[ { "s", "snippets" }, True ];
2019

2120
(* ::**************************************************************************************************************:: *)
2221
(* ::Subsection::Closed:: *)
@@ -30,38 +29,6 @@ If[ $check , Get @ cFile @ FileNameJoin @ { $scriptDir, "Resources", "CodeInsp
3029
(*Other*)
3130
Needs[ "Wolfram`PacletCICD`" -> "cicd`" ];
3231

33-
(* ::**************************************************************************************************************:: *)
34-
(* ::Section::Closed:: *)
35-
(*Download Snippets*)
36-
$baseSnippetsURL = "https://github.com/WolframResearch/Chatbook/releases/download/";
37-
38-
downloadSnippets[ ] :=
39-
Enclose @ Module[ { targetDir, docZip, rsZip },
40-
targetDir = FileNameJoin @ { $pacletDir, "Assets/Snippets/Streamable" };
41-
42-
docZip = URLDownload[
43-
$baseSnippetsURL <> "Snippets-Documentation-14-3-0-11967661/Documentation.zip",
44-
FileNameJoin @ { $TemporaryDirectory, "Documentation.zip" }
45-
];
46-
47-
rsZip = URLDownload[
48-
$baseSnippetsURL <> "Snippets-ResourceSystem-1-0-0/ResourceSystem.zip",
49-
FileNameJoin @ { $TemporaryDirectory, "ResourceSystem.zip" }
50-
];
51-
52-
ConfirmMatch[
53-
ExtractArchive[ docZip, FileNameJoin @ { targetDir, "Documentation" }, OverwriteTarget -> True ],
54-
{ __String? FileExistsQ }
55-
];
56-
57-
ConfirmMatch[
58-
ExtractArchive[ rsZip, FileNameJoin @ { targetDir, "ResourceSystem" }, OverwriteTarget -> True ],
59-
{ __String? FileExistsQ }
60-
];
61-
62-
cicd`ConsoleLog @ SequenceForm[ "Downloaded snippets files: ", FileNames[ All, targetDir, Infinity ] ]
63-
];
64-
6532
(* ::**************************************************************************************************************:: *)
6633
(* ::Section::Closed:: *)
6734
(*Run*)
@@ -72,13 +39,12 @@ downloadSnippets[ ] :=
7239
If[ $download,
7340
Block[ { $ProgressReporting = True },
7441
cicd`ConsoleLog[ "Downloading documentation snippets..." ];
75-
downloadSnippets[ ]
76-
(* snippetDir = cDir @ Wolfram`Chatbook`InstallDocumentationResources[ ][ "Location" ];
42+
snippetDir = cDir @ Wolfram`Chatbook`InstallDocumentationResources[ ][ "Location" ];
7743
targetDir = FileNameJoin @ { $pacletDir, "Assets/Snippets/Streamable" };
7844
If[ DirectoryQ @ targetDir, DeleteDirectory[ targetDir, DeleteContents -> True ] ];
7945
copied = cDir @ CopyDirectory[ snippetDir, targetDir ];
8046
cicd`ConsoleLog @ SequenceForm[ "Copied documentation snippets to: ", copied ];
81-
If[ StringQ @ Environment[ "GITHUB_ACTIONS" ], DeleteDirectory[ snippetDir, DeleteContents -> True ] ]; *)
47+
If[ StringQ @ Environment[ "GITHUB_ACTIONS" ], DeleteDirectory[ snippetDir, DeleteContents -> True ] ];
8248
]
8349
];
8450

0 commit comments

Comments
 (0)