summaryrefslogtreecommitdiff
path: root/.github/workflows/bin
diff options
context:
space:
mode:
authorAlec Scott <hi@alecbcs.com>2024-07-09 04:46:09 +0200
committerGitHub <noreply@github.com>2024-07-09 04:46:09 +0200
commit7c5fbee327f7735e1ac5a7cf1a55a292428f0690 (patch)
treed6ac8920ce70324b5b7cef0dcd51ceed73c0f7b0 /.github/workflows/bin
parentb19c4cdcf66beb1c2386bec64e8071bc6d559ab1 (diff)
downloadspack-7c5fbee327f7735e1ac5a7cf1a55a292428f0690.tar.gz
spack-7c5fbee327f7735e1ac5a7cf1a55a292428f0690.tar.bz2
spack-7c5fbee327f7735e1ac5a7cf1a55a292428f0690.tar.xz
spack-7c5fbee327f7735e1ac5a7cf1a55a292428f0690.zip
Improve organization of CI workflow scripts and pip requirements (#45037)
Diffstat (limited to '.github/workflows/bin')
-rwxr-xr-x.github/workflows/bin/bootstrap-test.sh8
-rw-r--r--.github/workflows/bin/execute_installer.ps17
-rwxr-xr-x.github/workflows/bin/generate_spack_yaml_containerize.sh9
-rw-r--r--.github/workflows/bin/setup_git.ps110
-rwxr-xr-x.github/workflows/bin/setup_git.sh8
-rw-r--r--.github/workflows/bin/system_shortcut_check.ps14
6 files changed, 46 insertions, 0 deletions
diff --git a/.github/workflows/bin/bootstrap-test.sh b/.github/workflows/bin/bootstrap-test.sh
new file mode 100755
index 0000000000..563eb28643
--- /dev/null
+++ b/.github/workflows/bin/bootstrap-test.sh
@@ -0,0 +1,8 @@
+#!/bin/bash
+set -e
+source share/spack/setup-env.sh
+$PYTHON bin/spack bootstrap disable github-actions-v0.4
+$PYTHON bin/spack bootstrap disable spack-install
+$PYTHON bin/spack $SPACK_FLAGS solve zlib
+tree $BOOTSTRAP/store
+exit 0
diff --git a/.github/workflows/bin/execute_installer.ps1 b/.github/workflows/bin/execute_installer.ps1
new file mode 100644
index 0000000000..9d9f5cfbeb
--- /dev/null
+++ b/.github/workflows/bin/execute_installer.ps1
@@ -0,0 +1,7 @@
+$ proc = Start-Process ${{ env.spack_installer }}\spack.exe "/install /quiet" -Passthru
+$handle = $proc.Handle # cache proc.Handle
+$proc.WaitForExit();
+
+if ($proc.ExitCode -ne 0) {
+ Write-Warning "$_ exited with status code $($proc.ExitCode)"
+}
diff --git a/.github/workflows/bin/generate_spack_yaml_containerize.sh b/.github/workflows/bin/generate_spack_yaml_containerize.sh
new file mode 100755
index 0000000000..2a180b7dd1
--- /dev/null
+++ b/.github/workflows/bin/generate_spack_yaml_containerize.sh
@@ -0,0 +1,9 @@
+#!/bin/bash
+ (echo "spack:" \
+&& echo " specs: []" \
+&& echo " container:" \
+&& echo " format: docker" \
+&& echo " images:" \
+&& echo " os: \"${SPACK_YAML_OS}\"" \
+&& echo " spack:" \
+&& echo " ref: ${GITHUB_REF}") > spack.yaml
diff --git a/.github/workflows/bin/setup_git.ps1 b/.github/workflows/bin/setup_git.ps1
new file mode 100644
index 0000000000..836b7f8a2c
--- /dev/null
+++ b/.github/workflows/bin/setup_git.ps1
@@ -0,0 +1,10 @@
+# (c) 2022 Lawrence Livermore National Laboratory
+
+git config --global user.email "spack@example.com"
+git config --global user.name "Test User"
+git config --global core.longpaths true
+
+if ($(git branch --show-current) -ne "develop")
+{
+ git branch develop origin/develop
+}
diff --git a/.github/workflows/bin/setup_git.sh b/.github/workflows/bin/setup_git.sh
new file mode 100755
index 0000000000..4eb416720b
--- /dev/null
+++ b/.github/workflows/bin/setup_git.sh
@@ -0,0 +1,8 @@
+#!/bin/bash -e
+git config --global user.email "spack@example.com"
+git config --global user.name "Test User"
+
+# create a local pr base branch
+if [[ -n $GITHUB_BASE_REF ]]; then
+ git fetch origin "${GITHUB_BASE_REF}:${GITHUB_BASE_REF}"
+fi
diff --git a/.github/workflows/bin/system_shortcut_check.ps1 b/.github/workflows/bin/system_shortcut_check.ps1
new file mode 100644
index 0000000000..03b3a236f1
--- /dev/null
+++ b/.github/workflows/bin/system_shortcut_check.ps1
@@ -0,0 +1,4 @@
+param ($systemFolder, $shortcut)
+
+$start = [System.Environment]::GetFolderPath("$systemFolder")
+Invoke-Item "$start\Programs\Spack\$shortcut"