这是indexloc提供的服务,不要输入任何密码
Skip to content

Fix Actions job errors #156

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Jun 20, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 11 additions & 9 deletions .github/workflows/build-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,8 @@ env:
${{ inputs.app-version != '' && format('APP_VERSION={0}', inputs.app-version) || '' }}
${{ inputs.app-name != '' && format('APP_NAME={0}', inputs.app-name) || '' }}
${{ inputs.openfoam-git-branch != '' && format('OPENFOAM_GIT_BRANCH={0}', inputs.openfoam-git-branch) || '' }}

OPENFOAM: ${{ inputs.openfoam-git-branch || inputs.openfoam-version }}

jobs:
deps:
Expand All @@ -57,7 +59,7 @@ jobs:
path: build/*-build.sparsebundle
key: ignore
restore-keys:
build-${{ inputs.openfoam-version }}-${{ hashFiles('make_build.txt', 'Brewfile', format('OpenFOAM-v${0}.tgz.sha256', inputs.openfoam-version), 'configure.sh') }}-
build-${{ env.OPENFOAM }}-${{ hashFiles('make_build.txt', 'Brewfile', format('OpenFOAM-v${0}.tgz.sha256', inputs.openfoam-version), 'configure.sh') }}-
lookup-only: true
- name: Look up cached deps
if: inputs.use-cached && steps.cache_build.outputs.cache-matched-key == ''
Expand All @@ -67,7 +69,7 @@ jobs:
path: build/*-deps.sparsebundle
key: ignore
restore-keys:
deps-${{ inputs.app-name || inputs.openfoam-version }}-${{ hashFiles('make_deps.txt', 'Brewfile') }}-
deps-${{ env.OPENFOAM }}-${{ hashFiles('make_deps.txt', 'Brewfile') }}-
lookup-only: true
- name: Make deps
if: steps.cache_build.outputs.cache-matched-key == '' && steps.cache_deps.outputs.cache-matched-key == ''
Expand All @@ -78,7 +80,7 @@ jobs:
uses: actions/cache/save@v3
with:
path: build/*-deps.sparsebundle
key: deps-${{ inputs.app-name || inputs.openfoam-version }}-${{ hashFiles('make_deps.txt', 'Brewfile') }}-${{ github.run_id }}
key: deps-${{ env.OPENFOAM }}-${{ hashFiles('make_deps.txt', 'Brewfile') }}-${{ github.run_id }}

build:
needs: deps
Expand All @@ -98,7 +100,7 @@ jobs:
path: build/*-build.sparsebundle
key: ignore
restore-keys:
build-${{ inputs.openfoam-version }}-${{ hashFiles('make_build.txt', 'Brewfile', format('OpenFOAM-v${0}.tgz.sha256', inputs.openfoam-version), 'configure.sh') }}-
build-${{ env.OPENFOAM }}-${{ hashFiles('make_build.txt', 'Brewfile', format('OpenFOAM-v${0}.tgz.sha256', inputs.openfoam-version), 'configure.sh') }}-
- name: Restore cached deps
if: steps.cache_build.outputs.cache-matched-key == ''
id: cache_deps
Expand All @@ -107,7 +109,7 @@ jobs:
path: build/*-deps.sparsebundle
key: ignore
restore-keys:
deps-${{ inputs.app-name || inputs.openfoam-version }}-${{ hashFiles('make_deps.txt', 'Brewfile') }}-
deps-${{ env.OPENFOAM }}-${{ hashFiles('make_deps.txt', 'Brewfile') }}-
fail-on-cache-miss: true
- name: Reuse cached build or deps
run: |
Expand All @@ -122,14 +124,14 @@ jobs:
uses: actions/cache/save@v3
with:
path: build/*-build.sparsebundle
key: build-${{ inputs.openfoam-version }}-${{ hashFiles('make_build.txt', 'Brewfile', format('OpenFOAM-v${0}.tgz.sha256', inputs.openfoam-version), 'configure.sh') }}-${{ github.run_id }}
key: build-${{ env.OPENFOAM }}-${{ hashFiles('make_build.txt', 'Brewfile', format('OpenFOAM-v${0}.tgz.sha256', inputs.openfoam-version), 'configure.sh') }}-${{ github.run_id }}
- name: Make app
run: |
make zip $MAKE_VARS
- name: Upload app artifact
uses: actions/upload-artifact@v3
with:
name: app-${{ inputs.openfoam-version }}
name: app-${{ env.OPENFOAM }}
path: build/*-app-*.zip
if-no-files-found: error

Expand All @@ -146,7 +148,7 @@ jobs:
- name: Download app artifact
uses: actions/download-artifact@v3
with:
name: app-${{ inputs.openfoam-version }}
name: app-${{ env.OPENFOAM }}
path: build
- name: Unzip app
run: |
Expand All @@ -164,7 +166,7 @@ jobs:
- name: Download app artifact
uses: actions/download-artifact@v3
with:
name: app-${{ inputs.openfoam-version }}
name: app-${{ env.OPENFOAM }}
- name: Upload app to release
uses: svenstaro/upload-release-action@v2
with:
Expand Down
1 change: 1 addition & 0 deletions .github/workflows/openfoam-dev-branches.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ name: OpenFOAM development branches
on:
schedule:
- cron: '0 6 * * 5'
workflow_dispatch:

jobs:
openfoam-dev-branch:
Expand Down