Skip to content

Commit

Permalink
Add workflow to manually update the lib cache
Browse files Browse the repository at this point in the history
We cache `lib` in order to speed up our builds as building all of LLVM
takes a long long time. Once an update to any of the files that would
invalidate the cached libs is done, until a new cached version is done
on "main", it won't apply to new PRs.

This workflow allows us to update (if needed) the lib cache for any
given branch. In general, this would usually only be used on `main`.
  • Loading branch information
SeanTAllen committed Aug 7, 2023
1 parent 2b3dbf9 commit 6b7d3e3
Showing 1 changed file with 36 additions and 0 deletions.
36 changes: 36 additions & 0 deletions .github/workflows/update-lib-cache.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
name: Manually update lib cache

on:
workflow_dispatch

concurrency:
group: "update-lib-cache"

jobs:
x86_64-linux:
runs-on: ubuntu-latest

strategy:
matrix:
include:
- image: ponylang/ponyc-ci-x86-64-unknown-linux-ubuntu22.04-builder:20230806
name: x86-64 Ubuntu 22.04
- image: ponylang/ponyc-ci-x86-64-unknown-linux-ubuntu20.04-builder:20230807
name: x86-64 Ubuntu 20.04

name: ${{ matrix.name }}
container:
image: ${{ matrix.image }}
options: --user pony
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Cache Libs
id: cache-libs
uses: actions/cache@v3
with:
path: build/libs
key: libs-${{ matrix.image }}-${{ hashFiles('Makefile', 'CMakeLists.txt', 'libs/CMakeLists.txt') }}
- name: Build Libs
if: steps.cache-libs.outputs.cache-hit != 'true'
run: make libs build_flags=-j8

0 comments on commit 6b7d3e3

Please sign in to comment.