Skip to content

Commit 0ee587f

Browse files
luhenrydbast
andauthored
Add miniforge for linux-riscv64 (#567)
* Add miniforge for linux-riscv64 * fix: resolve architecture and docs CI failures --------- Co-authored-by: Daniel Bast <[email protected]>
1 parent 8646c59 commit 0ee587f

6 files changed

Lines changed: 18 additions & 8 deletions

File tree

‎.github/workflows/docs.yml‎

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -54,16 +54,21 @@ jobs:
5454
id: pages
5555
uses: actions/deploy-pages@368f82528645a54fb793d4d04e342629a3f51346 # v5.0.1
5656

57-
# Netlify preview — only on PRs (excluding Dependabot, which has no secrets access)
57+
# Netlify preview — only on same-repository PRs with deployment secrets
5858
- if:
5959
github.event_name == 'pull_request' && github.actor !=
60-
'dependabot[bot]'
60+
'dependabot[bot]' && github.event.pull_request.head.repo.full_name ==
61+
github.repository
6162
name: Deploy to Netlify
6263
id: netlify
6364
env:
6465
NETLIFY_AUTH_TOKEN: ${{ secrets.NETLIFY_AUTH_TOKEN }}
6566
NETLIFY_SITE_ID: ${{ secrets.NETLIFY_SITE_ID }}
6667
run: |
68+
if [[ -z "$NETLIFY_AUTH_TOKEN" || -z "$NETLIFY_SITE_ID" ]]; then
69+
echo "Skipping Netlify preview: deployment secrets are unavailable."
70+
exit 0
71+
fi
6772
npm install -g netlify-cli
6873
netlify deploy \
6974
--dir=docs/api \
@@ -73,9 +78,7 @@ jobs:
7378
DEPLOY_URL=$(jq -r '.deploy_url' deploy_output.json)
7479
echo "deploy_url=$DEPLOY_URL" >> "$GITHUB_OUTPUT"
7580
76-
- if:
77-
github.event_name == 'pull_request' && github.actor !=
78-
'dependabot[bot]'
81+
- if: steps.netlify.outputs.deploy_url != ''
7982
name: Comment on PR
8083
uses: marocchino/sticky-pull-request-comment@5770ad5eb8f42dd2c4f34da00c94c5381e49af88 # v3.0.5
8184
with:

‎dist/delete/index.js‎

Lines changed: 1 addition & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

‎dist/setup/index.js‎

Lines changed: 1 addition & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

‎src/__tests__/constants.test.ts‎

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -163,15 +163,18 @@ describe("MINIFORGE_ARCHITECTURES", () => {
163163
expect(keys).toContain("x86_64");
164164
expect(keys).toContain("aarch64");
165165
expect(keys).toContain("arm64");
166+
expect(keys).toContain("riscv64");
166167
});
167168

168169
it("maps x64 to x86_64", () => {
169170
expect(MINIFORGE_ARCHITECTURES["x64"]).toBe("x86_64");
170171
});
171172

172-
it("is a subset of MINICONDA_ARCHITECTURES keys (all keys exist there)", () => {
173-
for (const key of Object.keys(MINIFORGE_ARCHITECTURES)) {
174-
expect(MINICONDA_ARCHITECTURES).toHaveProperty(key);
173+
it("uses the same mappings as Miniconda for shared architectures", () => {
174+
for (const [key, value] of Object.entries(MINIFORGE_ARCHITECTURES)) {
175+
if (key in MINICONDA_ARCHITECTURES) {
176+
expect(value).toBe(MINICONDA_ARCHITECTURES[key]);
177+
}
175178
}
176179
});
177180
});

‎src/__tests__/installer/download-miniforge.test.ts‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,7 @@ vi.mock("../../constants", () => ({
3333
aarch64: "aarch64",
3434
ppc64le: "ppc64le",
3535
arm64: "arm64",
36+
riscv64: "riscv64",
3637
},
3738
MINIFORGE_URL_PREFIX: "https://github.com/conda-forge/miniforge/releases",
3839
MINIFORGE_DEFAULT_VARIANT: "Miniforge3",

‎src/constants.ts‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,7 @@ export const MINIFORGE_ARCHITECTURES: types.IArchitectures = {
4444
aarch64: "aarch64",
4545
ppc64le: "ppc64le", // To be supported by github runners
4646
arm64: "arm64",
47+
riscv64: "riscv64",
4748
};
4849

4950
/** Map from Node.js platform strings to OS names used in installer filenames. */

0 commit comments

Comments
 (0)