From cae9fdedc6d2a72ce464e12edf46a35c42ce130b Mon Sep 17 00:00:00 2001 From: Callum Birks Date: Tue, 24 Sep 2024 12:43:37 +0100 Subject: [PATCH 1/2] Attempting to add EE build & test to Actions. --- .github/workflows/build.yml | 33 ++++++++++++++++++++++++++++++--- 1 file changed, 30 insertions(+), 3 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 9f4278790..94179e689 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -33,12 +33,39 @@ jobs: runs-on: ${{ matrix.os }} steps: - - uses: actions/checkout@v2 + - uses: actions/checkout@v4 with: submodules: recursive #### BUILD + - name: Setup SSH (Ubuntu / MacOS) + if: runner.os != 'Windows' + working-directory: ${{github.workspace}} + run: | + eval "$(ssh-agent -s)" + ssh-add - <<< '${{ secrets.EE_SSH_KEY }}' + + - name: Setup SSH (Windows) + if: runner.os == 'Windows' + working-directory: ${{github.workspace}} + run: | + Get-Service -Name ssh-agent | Set-Service -StartupType Manual + Start-Service ssh-agent + ssh-add - <<< '${{ secrets.EE_SSH_KEY }}' + + - name: Clone EE PR Branch + id: clone-ee-pr + if: '${{github.event_name}}' == 'pull_request' + continue-on-error: true + working-directory: ${{github.workspace}}/.. + run: git clone git@github.com:couchbase/couchbase-lite-core-EE --branch ${{github.head_ref}} --recursive --depth 1 + + - name: Clone EE Target Branch + if: '${{github.event_name}}' == 'push' || ${{ steps.clone-ee-pr.conclusion == 'failure' }} + working-directory: ${{github.workspace}}/.. + run: git clone git@github.com:couchbase/couchbase-lite-core-EE --branch ${{github.base_ref}} --recursive --depth 1 + - name: Create Build Environment # Create a build directory, as our working directory for all subsequent commands working-directory: ${{github.workspace}} @@ -50,7 +77,7 @@ jobs: # The CMake binaries on the Github Actions machines are (as of this writing) 3.12" if: runner.os != 'Windows' working-directory: ${{github.workspace}}/build - run: cmake .. -DCMAKE_BUILD_TYPE=$BUILD_TYPE + run: cmake .. -DCMAKE_BUILD_TYPE=$BUILD_TYPE -DBUILD_ENTERPRISE=ON - name: Configure CMake (Windows) # "Note the current convention is to use the -S and -B options here to specify source @@ -58,7 +85,7 @@ jobs: # The CMake binaries on the Github Actions machines are (as of this writing) 3.12" if: runner.os == 'Windows' working-directory: ${{github.workspace}}/build - run: cmake .. -A x64 + run: cmake .. -A x64 -DBUILD_ENTERPRISE=ON - name: Build # Use cmake to build -- this will invoke `make` on Linux/Mac, Visual Studio on Windows. From 762991e8a9dd3af2024c402a70d19bd5ed343f1d Mon Sep 17 00:00:00 2001 From: Callum Birks Date: Tue, 24 Sep 2024 12:49:30 +0100 Subject: [PATCH 2/2] Attempted fix. --- .github/workflows/build.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 94179e689..bc68028c1 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -56,13 +56,13 @@ jobs: - name: Clone EE PR Branch id: clone-ee-pr - if: '${{github.event_name}}' == 'pull_request' + if: ${{ github.event_name == 'pull_request' }} continue-on-error: true working-directory: ${{github.workspace}}/.. run: git clone git@github.com:couchbase/couchbase-lite-core-EE --branch ${{github.head_ref}} --recursive --depth 1 - name: Clone EE Target Branch - if: '${{github.event_name}}' == 'push' || ${{ steps.clone-ee-pr.conclusion == 'failure' }} + if: ${{ github.event_name == 'push' || steps.clone-ee-pr.conclusion == 'failure' }} working-directory: ${{github.workspace}}/.. run: git clone git@github.com:couchbase/couchbase-lite-core-EE --branch ${{github.base_ref}} --recursive --depth 1