# Build using Github actions

**URL:** <https://forum.juce.com/t/build-using-github-actions/46176>\
**Category:** General JUCE discussion\
**Created:** [May 25, 2021, 2:01am UTC](https://forum.juce.com/t/build-using-github-actions/46176 "2021-05-25T02:01:17Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![kenobi](https://avatars.discourse-cdn.com/v4/letter/k/ed8c4c/32.png) [@kenobi](https://forum.juce.com/u/kenobi)\
**Post date:** [May 25, 2021, 2:01am UTC](https://forum.juce.com/t/build-using-github-actions/46176/1 "2021-05-25T02:01:17Z")

</div>

Hi everyone,

I am very new to JUCE so be patient with me.  
I have a JUCE plugin and I would like to implement CI/CD for it using Github actions. My final goal is to have my plugin built, signed and deployed automatically.  
For the signed part, I already wrote a shell script to sign it, notarize it, check its status and staple (all for Mac OS) so I think that part should be fine.  
But for the build part I am not sure what I am doing wrong. There is a topic on the issue ([Continuous Integration with CMake + GitHub Actions](https://forum.juce.com/t/continuous-integration-with-cmake-github-actions/40569)) which I followed but I do not know if I have followed it correctly.  
Here’s the steps I learned from the previous topic to take using github actions

1. checkout my repo (my plugin app)
2. checkout JUCE: we want to use this to build our plugin with it
3. create a build environment with juce
4. create JUCE configuration and JUCE build environment
5. create build environment for the plugin

My yml file is as displayed below

name: MyPluginName  
on: [push]  
env:  
BUILD\_TYPE: Release  
jobs:  
build:  
runs-on: ${{matrix.os}}  
strategy:  
matrix:  
os: [macos-latest]  
steps:  
- name: “Preparation”  
uses: actions/checkout@v2

```
    - name: "(JUCE) Clone Repository"
      uses: actions/checkout@v2
      with:
        repository: juce-framework/JUCE
        path: ${{runner.workspace}}/myRepo/JUCE

    - name: "(JUCE) Create Build Environment"
      working-directory: ${{runner.workspace}}/myRepo/JUCE
      run: cmake -E make_directory ${{runner.workspace}}/myRepo/JUCE/build

    - name: "(JUCE) Configuration"
      working-directory: ${{runner.workspace}}/myRepo/JUCE/build
      run: cmake ${{runner.workspace}}/myRepo/JUCE

    - name: "(JUCE) Build"
      working-directory: ${{runner.workspace}}/myRepo/JUCE/build
      run: cmake --build .

    - name: "(MyPluginName) Create Build Environment"
      working-directory: ${{runner.workspace}}/MyPluginName
      run: cmake -E make_directory ${{runner.workspace}}/build

    - name: "(MyPluginName) Configuration"
      working-directory: ${{runner.workspace}}/myRepo/build
      run: cmake ${{runner.workspace}}/myRepo

    - name: "(MyPluginName) Build"
      working-directory: ${{runner.workspace}}/myRepo/build
      run: cmake --build . --config $BUILD_TYPE

```

It keeps failing at (MyPluginName) Create Build Environment because of  
**Run cmake -E make\_directory /Users/runner/work/bc\_wtih\_actions/build**  
\*\* cmake -E make\_directory /Users/runner/work/bc\_wtih\_actions/build\*\*  
\*\* shell: /bin/bash -e {0}\*\*  
\*\* env:\*\*  
\*\* BUILD\_TYPE: Release\*\*  
\*\* Error: No such file or directory\*\*

Does anyone have any idea how to fix it? Anyone has a working sample of it? I would very much appreciate it.  
Thank you

PS: there is a chance that my approach has not been correct. Any guidance on that would also be appreciated.

---

<div class="post-metadata">

**Author:** ![moritzsur](https://avatars.discourse-cdn.com/v4/letter/m/a587f6/32.png) [@moritzsur](https://forum.juce.com/u/moritzsur)\
**Post date:** [August 28, 2023, 9:21pm UTC](https://forum.juce.com/t/build-using-github-actions/46176/3 "2023-08-28T21:21:58Z")

</div>

For your issue, maybe add JUCE as a submodule?

You don’t need to do step 2-4, check out Pamplejuce by @sudara for a great example on how to do this.

I build and test with a bash script since it’s way easier to debug locally and I would do this as much as possible.  
GPT 4 is pretty good at translating GH actions to bash/Powershell if you need a point to get started with these.
