# Github action recompiling everything everytime

**URL:** <https://discourse.julialang.org/t/github-action-recompiling-everything-everytime/94348>\
**Category:** General Usage\
**Tags:** github-actions\
**Created:** [February 9, 2023, 2:37pm UTC](https://discourse.julialang.org/t/github-action-recompiling-everything-everytime/94348 "2023-02-09T14:37:34Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![lrnv](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/lrnv/32/19373_2.png) [@lrnv](https://discourse.julialang.org/u/lrnv)\
**Post date:** [February 9, 2023, 2:37pm UTC](https://discourse.julialang.org/t/github-action-recompiling-everything-everytime/94348/1 "2023-02-09T14:37:34Z")

</div>

Hey,

i’m trying to run some Julia code on github action. I have a Project.toml and a Manifest.toml in the repo, and my `main.jl` file starts as:

```julia
using Pkg
Pkg.activate(".")
Pkg.instantiate(verbose = true)
using AllNeededPackages
# run code to produce graphs and stuff. 
# ...
Plots.savefig("figs/figure.pdf")
# ...

```

The `.github/workflows/build.toml` looks like :

```plaintext
name: Build
on: [push, pull_request]
jobs:
  build:
    runs-on: ubuntu-latest
    steps:
      - name: Checkout repo with history.
        uses: actions/checkout@v2
        with:
          fetch-depth: 0
      - name: Setup Julia
        uses: julia-actions/setup-julia@v1
        with:
          version: 1.8.5
      - name: Cache Julia 
        uses: julia-actions/cache@v1
        with:
          cache-registries: "true"
          cache-compiled: "true"
      - name: Run julia code
        run: julia --project main.jl
        env:
            GKSwstype: "100" # https://discourse.julialang.org/t/generation-of-documentation-fails-qt-qpa-xcb-could-not-connect-to-display/60988
      - name: Other stuff using the resulting graphs...
...
...

```

This is working correctly however it looks like it recompiles every package at every run. Am I doing something wrong // is there a way to tell github action to cache the compiled stuff ?

Is there a ‘softer’ way to setup my environement ?
