Skip to content

Commit

Permalink
Check out repository directly into the workspace directory of a Githu…
Browse files Browse the repository at this point in the history
…b workflow.
  • Loading branch information
michael-rapp committed Nov 12, 2023
1 parent 59e1715 commit 69c21cb
Show file tree
Hide file tree
Showing 2 changed files with 48 additions and 50 deletions.
83 changes: 41 additions & 42 deletions .github/workflows/test_build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,16 +22,15 @@ jobs:
- name: Look up Git repository in cache
uses: actions/cache/restore@v3
with:
path: Boomer/.git/
path: .git/
key: test-build-git
- name: Checkout
uses: actions/checkout@v4
with:
path: Boomer/
path: .
- uses: dorny/paths-filter@v2
id: filter
with:
working-directory: Boomer/
filters: |
cpp: &cpp
- 'scons/**'
Expand Down Expand Up @@ -61,7 +60,7 @@ jobs:
uses: actions/cache/save@v3
if: success() || failure()
with:
path: Boomer/.git/
path: .git/
key: test-build-git
linux_build:
needs: changes
Expand All @@ -72,12 +71,12 @@ jobs:
- name: Look up Git repository in cache
uses: actions/cache/restore@v3
with:
path: Boomer/.git/
path: .git/
key: test-build-git
- name: Checkout
uses: actions/checkout@v4
with:
path: Boomer/
path: .
- name: Install OpenCL
run: |
sudo apt update
Expand All @@ -88,16 +87,16 @@ jobs:
uses: actions/cache/restore@v3
with:
path: |
- Boomer/venv/
- Boomer/scons/build/
- Boomer/cpp/build/
- Boomer/python/**/cython/*.so*
- Boomer/python/**/build/
- Boomer/python/**/dist/
- Boomer/python/**/*egg-info/
- Boomer/doc/_build/
- Boomer/doc/_extra/
- Boomer/doc/development/api/python/
- venv/
- scons/build/
- cpp/build/
- python/**/cython/*.so*
- python/**/build/
- python/**/dist/
- python/**/*egg-info/
- doc/_build/
- doc/_extra/
- doc/development/api/python/
key: ${{ runner.os }}-test-build-tmp-files
- name: Test C++ code
if: ${{ needs.changes.outputs.cpp_tests == 'true' }}
Expand Down Expand Up @@ -125,16 +124,16 @@ jobs:
if: success() || failure()
with:
path: |
- Boomer/venv/
- Boomer/scons/build/
- Boomer/cpp/build/
- Boomer/python/**/cython/*.so*
- Boomer/python/**/build/
- Boomer/python/**/dist/
- Boomer/python/**/*egg-info/
- Boomer/doc/_build/
- Boomer/doc/_extra/
- Boomer/doc/development/api/python/
- venv/
- scons/build/
- cpp/build/
- python/**/cython/*.so*
- python/**/build/
- python/**/dist/
- python/**/*egg-info/
- doc/_build/
- doc/_extra/
- doc/development/api/python/
key: ${{ runner.os }}-test-build-tmp-files
macos_build:
needs: changes
Expand All @@ -145,12 +144,12 @@ jobs:
- name: Look up Git repository in cache
uses: actions/cache/restore@v3
with:
path: Boomer/.git/
path: .git/
key: test-build-git
- name: Checkout
uses: actions/checkout@v4
with:
path: Boomer/
path: .
- name: Install OpenMP
run: |
brew install libomp
Expand All @@ -161,9 +160,9 @@ jobs:
uses: actions/cache/restore@v3
with:
path: |
- Boomer/venv/
- Boomer/scons/build/
- Boomer/cpp/build/
- venv/
- scons/build/
- cpp/build/
key: ${{ runner.os }}-test-build-tmp-files
- name: Compile via Clang
run: TEST_SUPPORT=disabled CPLUS_INCLUDE_PATH=/usr/local/opt/opencl-clhpp-headers/include ./build compile
Expand All @@ -172,9 +171,9 @@ jobs:
if: success() || failure()
with:
path: |
- Boomer/venv/
- Boomer/scons/build/
- Boomer/cpp/build/
- venv/
- scons/build/
- cpp/build/
key: ${{ runner.os }}-test-build-tmp-files
windows_build:
needs: changes
Expand All @@ -186,12 +185,12 @@ jobs:
uses: actions/cache/restore@v3
with:
enableCrossOsArchive: true
path: Boomer/.git/
path: .git/
key: test-build-git
- name: Checkout
uses: actions/checkout@v4
with:
path: Boomer/
path: .
- name: Prepare MSVC
uses: ilammy/msvc-dev-cmd@v1
- name: Remove conflicting link.exe
Expand All @@ -208,9 +207,9 @@ jobs:
uses: actions/cache/restore@v3
with:
path: |
- Boomer/venv/
- Boomer/scons/build/
- Boomer/cpp/build/
- venv/
- scons/build/
- cpp/build/
key: ${{ runner.os }}-test-build-tmp-files
- name: Compile via MSVC
run: |
Expand All @@ -223,7 +222,7 @@ jobs:
if: success() || failure()
with:
path: |
- Boomer/venv/
- Boomer/scons/build/
- Boomer/cpp/build/
- venv/
- scons/build/
- cpp/build/
key: ${{ runner.os }}-test-build-tmp-files
15 changes: 7 additions & 8 deletions .github/workflows/test_format.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,17 +19,16 @@ jobs:
- name: Look up Git repository in cache
uses: actions/cache/restore@v3
with:
path: Boomer/.git/
path: .git/
key: test-format-git
- name: Checkout
uses: actions/checkout@v4
with:
path: Boomer/
path: .
- name: Detect changes
uses: dorny/paths-filter@v2
id: filter
with:
working-directory: Boomer/
filters: |
cpp: &cpp
- 'scons/**'
Expand All @@ -50,8 +49,8 @@ jobs:
if: steps.filter.outputs.any == 'true'
with:
path: |
- Boomer/venv/
- Boomer/scons/build/
- venv/
- scons/build/
key: test-format-tmp-files
- name: Check C++ code style
if: steps.filter.outputs.cpp == 'true'
Expand All @@ -64,12 +63,12 @@ jobs:
if: (success() || failure()) && steps.filter.outputs.any == 'true'
with:
path: |
- Boomer/venv/
- Boomer/scons/build/
- venv/
- scons/build/
key: test-format-tmp-files
- name: Save Git repository to cache
uses: actions/cache/save@v3
if: success() || failure()
with:
path: Boomer/.git/
path: .git/
key: test-format-git

0 comments on commit 69c21cb

Please sign in to comment.