Skip to content

Commit 8496608

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

25 files changed

Lines changed: 224610 additions & 105759 deletions

.eslintignore

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

.github/workflows/react-native-build-test.yml

Lines changed: 18 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,15 @@
11
name: "react-native-build"
22
on: # rebuild any PRs and main branch changes
3-
pull_request:
4-
push:
5-
branches:
6-
- main
7-
- "releases/*"
3+
# pull_request:
4+
# push:
5+
# branches:
6+
# - main
7+
# - "releases/*"
8+
# Note: not interested in this type of test.
89

910
jobs:
1011
compile:
11-
runs-on: macos-11
12+
runs-on: macos-14
1213
timeout-minutes: 60
1314
env:
1415
BUILDCACHE_DIR: ../custom_buildcache_dir # will override default location
@@ -17,11 +18,11 @@ jobs:
1718
BUILDCACHE_MAX_CACHE_SIZE: 234567890 # will override default of 500000000
1819
BUILDCACHE_MAX_LOCAL_ENTRY_SIZE: 34567890 # Not used by buildache-action, but will pass through...
1920
steps:
20-
- uses: styfle/cancel-workflow-action@0.11.0
21+
- uses: styfle/cancel-workflow-action@0.12.1
2122
with:
2223
all_but_latest: true
2324

24-
- uses: actions/checkout@v3
25+
- uses: actions/checkout@v4
2526
with:
2627
fetch-depth: 50
2728

@@ -31,9 +32,9 @@ jobs:
3132
cache_key: react-native-compile # demonstrate putting custom key component in cache key
3233
upload_buildcache_log: true # demonstrate buildcache upload
3334

34-
- uses: actions/setup-node@v3
35+
- uses: actions/setup-node@v4
3536
with:
36-
node-version: 16
37+
node-version: '>=20.0.0'
3738

3839
- uses: maxim-lobanov/setup-xcode@v1
3940
with:
@@ -44,7 +45,7 @@ jobs:
4445
ruby-version: 3.0.2
4546

4647
- name: Update Ruby build tools
47-
uses: nick-invision/retry@v2
48+
uses: nick-invision/retry@v3
4849
with:
4950
timeout_minutes: 10
5051
retry_wait_seconds: 60
@@ -55,7 +56,7 @@ jobs:
5556
id: yarn-cache-dir-path
5657
run: echo "::set-output name=dir::$(yarn cache dir)"
5758

58-
- uses: actions/cache@v3
59+
- uses: actions/cache@v4
5960
name: Yarn Cache
6061
id: yarn-cache
6162
with:
@@ -64,14 +65,14 @@ jobs:
6465
restore-keys: ${{ runner.os }}-yarn
6566

6667
- name: Create React Native Demo
67-
uses: nick-invision/retry@v2
68+
uses: nick-invision/retry@v3
6869
with:
6970
timeout_minutes: 10
7071
retry_wait_seconds: 60
7172
max_attempts: 3
72-
command: npx react-native init demo --skip-install
73+
command: npx @react-native-community/cli init demo --skip-install
7374

74-
- uses: actions/cache@v3
75+
- uses: actions/cache@v4
7576
name: Cache Pods
7677
id: pods-cache
7778
with:
@@ -80,15 +81,15 @@ jobs:
8081
restore-keys: ${{ runner.os }}-pods-v2
8182

8283
- name: Install Demo dependencies
83-
uses: nick-invision/retry@v2
84+
uses: nick-invision/retry@v3
8485
with:
8586
timeout_minutes: 10
8687
retry_wait_seconds: 60
8788
max_attempts: 3
8889
command: pushd demo && yarn
8990

9091
- name: Install Pods
91-
uses: nick-invision/retry@v2
92+
uses: nick-invision/retry@v3
9293
with:
9394
timeout_minutes: 10
9495
retry_wait_seconds: 60

.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-

.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)