Skip to content

Commit

Permalink
Add build directory to cache
Browse files Browse the repository at this point in the history
  • Loading branch information
buty4649 committed May 27, 2023
1 parent 2218a4b commit 9b5373b
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 3 deletions.
18 changes: 16 additions & 2 deletions .github/workflows/build-and-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,20 +21,34 @@ jobs:
- name: Build cache
uses: actions/cache@v3
with:
path: build/ccache
path: build/
key: ${{ runner.os }}-ccache
- name: build
run: rake clean build:all
run: rake build:all release

- name: Upload test binary (linux-amd64)
uses: actions/upload-artifact@v3
with:
name: rf-${{ github.sha }}-linux-amd64
path: build/linux-amd64/bin/rf
- name: Upload test binary (linux-arm64)
uses: actions/upload-artifact@v3
with:
name: rf-${{ github.sha }}-linux-arm64
path: build/linux-arm64/bin/rf
- name: Upload test binary (darwin-amd64)
uses: actions/upload-artifact@v3
with:
name: rf-${{ github.sha }}-darwin-amd64
path: build/darwin-amd64/bin/rf
- name: Upload test binary (darwin-arm64)
uses: actions/upload-artifact@v3
with:
name: rf-${{ github.sha }}-darwin-arm64
path: build/darwin-arm64/bin/rf

- name: Cleanup build directory
run: rake clean

test-on-linux:
needs: build
Expand Down
3 changes: 2 additions & 1 deletion Rakefile
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,8 @@ end

desc 'Deep cleanup build cache'
task 'deep_clean' do
docker_run(cmd: 'deep_clean')
env = ["MRUBY_BUILD_TARGETS=#{build_targets.join(',')}"]
docker_run(cmd: 'deep_clean', env:)
end

desc 'Release the project'
Expand Down

0 comments on commit 9b5373b

Please sign in to comment.