Skip to content

Commit e816e08

Browse files
committed
Various updates and changes.
1 parent 03801a7 commit e816e08

25 files changed

Lines changed: 224604 additions & 105754 deletions

.eslintignore

Lines changed: 0 additions & 4 deletions
This file was deleted.

.github/workflows/test.yml

Lines changed: 6 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -12,18 +12,10 @@ jobs:
1212
GITHUB_TOKEN: '${{ github.token }}'
1313
runs-on: ubuntu-22.04
1414
steps:
15-
- uses: actions/checkout@v3
16-
- run: |
17-
yarn
18-
- run: |
19-
yarn all
20-
build-ubuntu-20-04: # make sure build/ci work properly
21-
env:
22-
GITHUB_TOKEN: '${{ github.token }}'
23-
ACTION_BUILDCACHE_TAG: "v0.27.6"
24-
runs-on: ubuntu-latest
25-
steps:
26-
- uses: actions/checkout@v3
15+
- uses: actions/checkout@v4
16+
- uses: actions/setup-node@v4
17+
with:
18+
node-version: '>=20.0.0'
2719
- run: |
2820
yarn
2921
- run: |
@@ -32,22 +24,9 @@ jobs:
3224
runs-on: ${{ matrix.os }}
3325
strategy:
3426
matrix:
35-
os: [ubuntu-22.04, macos-latest, windows-latest]
27+
os: [windows-2022, ubuntu-22.04, ubuntu-22.04-arm, macos-14]
3628
steps:
37-
- uses: actions/checkout@v3
29+
- uses: actions/checkout@v4
3830
- uses: ./
3931
with:
4032
cache_key: build-test-${{ matrix.os }}
41-
test-ubuntu-20-04: # make sure the action works on a clean machine without building
42-
# https://github.com/mbitsnbites/buildcache/issues/291
43-
runs-on: ${{ matrix.os }}
44-
strategy:
45-
matrix:
46-
os: [ubuntu-latest]
47-
steps:
48-
- uses: actions/checkout@v3
49-
- uses: ./
50-
with:
51-
cache_key: build-test-${{ matrix.os }}
52-
buildcache_tag: v0.27.6
53-

.github/workflows/react-native-build-test.yml renamed to .github/workflows/unused/react-native-build-test.yml

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ on: # rebuild any PRs and main branch changes
88

99
jobs:
1010
compile:
11-
runs-on: macos-11
11+
runs-on: macos-14
1212
timeout-minutes: 60
1313
env:
1414
BUILDCACHE_DIR: ../custom_buildcache_dir # will override default location
@@ -17,11 +17,11 @@ jobs:
1717
BUILDCACHE_MAX_CACHE_SIZE: 234567890 # will override default of 500000000
1818
BUILDCACHE_MAX_LOCAL_ENTRY_SIZE: 34567890 # Not used by buildache-action, but will pass through...
1919
steps:
20-
- uses: styfle/cancel-workflow-action@0.11.0
20+
- uses: styfle/cancel-workflow-action@0.12.1
2121
with:
2222
all_but_latest: true
2323

24-
- uses: actions/checkout@v3
24+
- uses: actions/checkout@v4
2525
with:
2626
fetch-depth: 50
2727

@@ -31,9 +31,9 @@ jobs:
3131
cache_key: react-native-compile # demonstrate putting custom key component in cache key
3232
upload_buildcache_log: true # demonstrate buildcache upload
3333

34-
- uses: actions/setup-node@v3
34+
- uses: actions/setup-node@v4
3535
with:
36-
node-version: 16
36+
node-version: '>=20.0.0'
3737

3838
- uses: maxim-lobanov/setup-xcode@v1
3939
with:
@@ -44,7 +44,7 @@ jobs:
4444
ruby-version: 3.0.2
4545

4646
- name: Update Ruby build tools
47-
uses: nick-invision/retry@v2
47+
uses: nick-invision/retry@v3
4848
with:
4949
timeout_minutes: 10
5050
retry_wait_seconds: 60
@@ -55,7 +55,7 @@ jobs:
5555
id: yarn-cache-dir-path
5656
run: echo "::set-output name=dir::$(yarn cache dir)"
5757

58-
- uses: actions/cache@v3
58+
- uses: actions/cache@v4
5959
name: Yarn Cache
6060
id: yarn-cache
6161
with:
@@ -64,14 +64,14 @@ jobs:
6464
restore-keys: ${{ runner.os }}-yarn
6565

6666
- name: Create React Native Demo
67-
uses: nick-invision/retry@v2
67+
uses: nick-invision/retry@v3
6868
with:
6969
timeout_minutes: 10
7070
retry_wait_seconds: 60
7171
max_attempts: 3
72-
command: npx react-native init demo --skip-install
72+
command: npx @react-native-community/cli init demo --skip-install
7373

74-
- uses: actions/cache@v3
74+
- uses: actions/cache@v4
7575
name: Cache Pods
7676
id: pods-cache
7777
with:
@@ -80,15 +80,15 @@ jobs:
8080
restore-keys: ${{ runner.os }}-pods-v2
8181

8282
- name: Install Demo dependencies
83-
uses: nick-invision/retry@v2
83+
uses: nick-invision/retry@v3
8484
with:
8585
timeout_minutes: 10
8686
retry_wait_seconds: 60
8787
max_attempts: 3
8888
command: pushd demo && yarn
8989

9090
- name: Install Pods
91-
uses: nick-invision/retry@v2
91+
uses: nick-invision/retry@v3
9292
with:
9393
timeout_minutes: 10
9494
retry_wait_seconds: 60

.releaserc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
"branches": [
44
{name: "main"}
55
],
6-
"repositoryUrl": "git@github.com:mikehardy/buildcache-action.git",
6+
"repositoryUrl": "git@github.com:opencor/buildcache-action.git",
77
"plugins": [
88
["@semantic-release/commit-analyzer", {
99
"preset": "conventionalcommits"

README.md

Lines changed: 6 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,3 @@
1-
# Archived - feel free to fork!
2-
3-
With apologies, I no longer use buildcache at all (ccache started working with react-native compiles shortly after I tried buildcache, so I started using ccache)
4-
5-
I helped document ccache integration here https://reactnative.dev/docs/build-speed#use-a-compiler-cache
6-
7-
As such I have no particular interest in this software and will not be maintaining it. Please feel free to fork it and continue development if you like
8-
91
# Accelerate builds using buildcache
102

113
Use this GitHub Action to accelerate compilation in your GitHub workflows using [buildcache](https://github.com/mbitsnbites/buildcache)
@@ -32,7 +24,7 @@ jobs:
3224
ios:
3325
runs-on: macos-latest # also runs on ubuntu and windows
3426
steps:
35-
- uses: mikehardy/buildcache-action@v2
27+
- uses: opencor/buildcache-action@v1
3628
```
3729
3830
- 500MB cache, cache is in `$GITHUB_WORKSPACE`, just needs build integration and you're set!
@@ -41,8 +33,8 @@ When using with `actions/checkout@v2`, add this action as a step after the check
4133

4234
```yaml
4335
steps:
44-
- uses: actions/checkout@v3
45-
- uses: mikehardy/buildcache-action@v2
36+
- uses: actions/checkout@v4
37+
- uses: opencor/buildcache-action@v1
4638
```
4739
#### Customize if you need to
4840

@@ -60,7 +52,7 @@ jobs:
6052
BUILDCACHE_LOG_FILE: ../buildcache.log # optional: Log where you like
6153
runs-on: macos-latest
6254
steps:
63-
- uses: mikehardy/buildcache-action@v2
55+
- uses: opencor/buildcache-action@v1
6456
with:
6557
cache_key: ${{ matrix.os }} # optional: separate caches maybe?
6658
upload_buildcache_log: 'true' # optional: 100% cache misses? Find out why
@@ -115,7 +107,7 @@ The overall buid time should make it obvious, but the real test is your cache hi
115107

116108
To verify things are working using the default configuration, look at the output of the workflow run, expand the "Post buildcache" step and check the statistics printed out. If you you "Re-run jobs" using the GitHub Actions web interface to re-run a job a second time, you _should_ see 100% hit rate, on quite a few objects.
117109

118-
The output of this repositories [react-native compile test action](https://github.com/mikehardy/buildcache-action/actions/workflows/react-native-build-test.yml) are a good example.
110+
The output of this repositories [react-native compile test action](https://github.com/opencor/buildcache-action/actions/workflows/react-native-build-test.yml) are a good example.
119111

120112
If you need more information, the default `BUILDCACHE_DEBUG` level of `2` is likely enough, you just need to add the `upload_buildcache_log` flag to your workflow integration and set it to `true`, then you may examine the actual output of buildcache as it worked, using the logfile attached as an artifact to the workflow run. If that still is not enough you may need a debug level of `1` See [Debugging Buildcache](https://github.com/mbitsnbites/buildcache/blob/master/doc/configuration.md#debugging) for more information.
121113

@@ -139,7 +131,7 @@ If you experience low cache hit rates on a project with a largely static codebas
139131

140132
This action does these things - if they interact poorly with your project, perhaps they could be altered slightly and made to work better if you propose a PR:
141133

142-
- fetches the latest version of [buildcache](https://github.com/mbitsnbites/buildcache)
134+
- fetches our own copy of [buildcache](https://github.com/opencor/buildcache-action/releases)
143135
- installs it in your project directory as `buiildcache/bin/buildcache`
144136
- makes symoblic links from `buildcache` to `clang` and `clang++`
145137
- adds that directory to your `$GITHUB_PATH` for future steps

action.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ inputs:
3232
default: "latest"
3333
description: "Explicitly provide the tag for the release of buildcache to be used. ie. `v0.27.7`"
3434
runs:
35-
using: 'node16'
35+
using: 'node20'
3636
main: 'dist/restore/index.js'
3737
post: 'dist/save/index.js'
3838
branding:

0 commit comments

Comments
 (0)