Skip to content

Commit

Permalink
better spacing
Browse files Browse the repository at this point in the history
  • Loading branch information
Angelyr committed Nov 6, 2024
1 parent 22c6fe2 commit 22f3939
Show file tree
Hide file tree
Showing 3 changed files with 18 additions and 19 deletions.
21 changes: 10 additions & 11 deletions .github/actions/install-repo/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,35 +11,34 @@ inputs:
required: true
cache:
required: true
type: boolean

runs:
using: "composite"
steps:

- name: Check Cache
if: ${{inputs.cache}}
if: ${{ inputs.cache }}
uses: actions/cache@v3
id: check-cache
with:
key: build-${{inputs.repo-name}}
path: ${{ runner.temp }}/build-${{inputs.repo-name}}
key: build-${{ inputs.repo-name }}
path: ${{ runner.temp }}/build-${{ inputs.repo-name }}

- name: Checkout Repo
uses: actions/checkout@v3
with:
repository: ${{inputs.repo-path}}
ref: ${{inputs.repo-ref}}
path: ${{inputs.repo-name}}
repository: ${{inputs.repo-path }}
ref: ${{ inputs.repo-ref }}
path: ${{ inputs.repo-name }}

- name: Configure CMake
if: ${{ !steps.check-cache.outputs.cache-hit }}
shell: bash
run: cmake -S $GITHUB_WORKSPACE/${{inputs.repo-name}} -B ${{ runner.temp }}/build-${{inputs.repo-name}}
-DCMAKE_INSTALL_PREFIX=${{ runner.temp }}/build-${{inputs.repo-name}}/install
${{inputs.options}}
run: cmake -S $GITHUB_WORKSPACE/${{ inputs.repo-name }} -B ${{ runner.temp }}/build-${{ inputs.repo-name }}
-DCMAKE_INSTALL_PREFIX=${{ runner.temp }}/build-${{ inputs.repo-name }}/install
${{ inputs.options }}

- name: Build Cmake
if: ${{ !steps.check-cache.outputs.cache-hit }}
shell: bash
run: cmake --build ${{ runner.temp }}/build-${{inputs.repo-name}} -j8 --target install
run: cmake --build ${{ runner.temp }}/build-${{ inputs.repo-name }} -j8 --target install
6 changes: 3 additions & 3 deletions .github/workflows/gpu-systems.yml
Original file line number Diff line number Diff line change
Expand Up @@ -42,9 +42,9 @@ jobs:
run: |
export GLOBUS_COMPUTE_CLIENT_ID="$GLOBUS_ID"
export GLOBUS_COMPUTE_CLIENT_SECRET="$GLOBUS_SECRET"
if [ ${{matrix.machine}} == perlmutter ]; then TARGET_ENDPOINT=0dd4499a-8d76-4977-bae9-841e4bb2f616; fi
if [ ${{matrix.machine}} == frontier ]; then TARGET_ENDPOINT=d625c6cf-de7a-4228-ac44-56247a642fe0; fi
python run-globus.py ${{matrix.machine}} ${{ github.event.repository.name }} ${{ github.sha }} $TARGET_ENDPOINT
if [ ${{ matrix.machine }} == perlmutter ]; then TARGET_ENDPOINT=0dd4499a-8d76-4977-bae9-841e4bb2f616; fi
if [ ${{ matrix.machine }} == frontier ]; then TARGET_ENDPOINT=d625c6cf-de7a-4228-ac44-56247a642fe0; fi
python run-globus.py ${{ matrix.machine }} ${{ github.event.repository.name }} ${{ github.sha }} $TARGET_ENDPOINT
- name: print build log
working-directory: ${{ github.event.repository.name }}/.github/workflows
Expand Down
10 changes: 5 additions & 5 deletions .github/workflows/run-globus.py
Original file line number Diff line number Diff line change
Expand Up @@ -39,16 +39,16 @@ def run_on_endpoint(name, branch, env_file, install_file, run_file):
text_file.write("%s" % run_file)
text_file.close()

install_command = "cd {0}-test && chmod +x install.sh && ./install.sh {1}".format(name, branch)
install_command = "cd {0}-test && chmod +x install.sh && ./install.sh {1} 2>&1 | tee install.log".format(name, branch)
install_result = subprocess.run([install_command], shell=True, encoding="utf_8", stdout=subprocess.PIPE, stderr=subprocess.STDOUT)

if install_result.returncode != 0:
# if install_result.returncode != 0:
return (install_result, None)

run_command = "cd {0}-test && chmod +x run.sh && ./run.sh".format(name)
run_result = subprocess.run([run_command], shell=True, encoding="utf_8", stdout=subprocess.PIPE, stderr=subprocess.STDOUT)
# run_command = "cd {0}-test && chmod +x run.sh && ./run.sh".format(name)
# run_result = subprocess.run([run_command], shell=True, encoding="utf_8", stdout=subprocess.PIPE, stderr=subprocess.STDOUT)

return (install_result, run_result)
# return (install_result, run_result)

gce = Executor(endpoint_id = endpoint)
future = gce.submit(run_on_endpoint, name, branch, env_file, install_file, run_file)
Expand Down

0 comments on commit 22f3939

Please sign in to comment.