From 8735e7cada9ffa2ad70149ad89e5ee8c134e2ff7 Mon Sep 17 00:00:00 2001 From: Ivailo Petrov <5092875+ivailop@users.noreply.github.com> Date: Sun, 15 Oct 2023 03:16:21 -0700 Subject: [PATCH 1/5] cd --- .semaphore/semaphore.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.semaphore/semaphore.yml b/.semaphore/semaphore.yml index 8294795..eb91d94 100644 --- a/.semaphore/semaphore.yml +++ b/.semaphore/semaphore.yml @@ -18,6 +18,7 @@ blocks: - printenv - curl -fsSL https://testspace-client.s3.amazonaws.com/testspace-linux.tgz | sudo tar -zxvf- -C $HOME - $HOME/testspace config url ivailo.stridespace.com + - cd .github jobs: - name: 'Job #1' commands: From 06058bef1cb97f36e8bbbb8dc80e244b2f8545d6 Mon Sep 17 00:00:00 2001 From: Ivailo Petrov <5092875+ivailop@users.noreply.github.com> Date: Sun, 15 Oct 2023 04:39:26 -0700 Subject: [PATCH 2/5] init-testspace --- .semaphore/semaphore.yml | 19 +++++++++---------- init_testspace.sh | 41 ++++++++++++++++++++++++++++++++++++++++ 2 files changed, 50 insertions(+), 10 deletions(-) create mode 100644 init_testspace.sh diff --git a/.semaphore/semaphore.yml b/.semaphore/semaphore.yml index eb91d94..7c42429 100644 --- a/.semaphore/semaphore.yml +++ b/.semaphore/semaphore.yml @@ -16,29 +16,28 @@ blocks: commands: &ref_0 - checkout - printenv - - curl -fsSL https://testspace-client.s3.amazonaws.com/testspace-linux.tgz | sudo tar -zxvf- -C $HOME - - $HOME/testspace config url ivailo.stridespace.com - - cd .github + - source ./init_testspace.sh + - printenv jobs: - name: 'Job #1' commands: - printenv - - $HOME/testspace config + - testspace config - cat $HOME/$SEMAPHORE_GIT_DIR/.testspace - - $HOME/testspace +README.md + - testspace +README.md - name: 'Job #2' commands: - printenv - - $HOME/testspace config + - testspace config - cat $HOME/$SEMAPHORE_GIT_DIR/.testspace - - $HOME/testspace +README.md + - testspace +README.md epilogue: always: commands: - printenv - $HOME/testspace config - cat $HOME/$SEMAPHORE_GIT_DIR/.testspace - - $HOME/testspace +README.md + - testspace +README.md - name: 'Block #2' dependencies: [] task: @@ -48,6 +47,6 @@ blocks: - name: 'Job #1' commands: - printenv - - $HOME/testspace config + - testspace config - cat $HOME/$SEMAPHORE_GIT_DIR/.testspace - - $HOME/testspace +README.md + - testspace +README.md diff --git a/init_testspace.sh b/init_testspace.sh new file mode 100644 index 0000000..e2d70e5 --- /dev/null +++ b/init_testspace.sh @@ -0,0 +1,41 @@ +#!/bin/bash + +# This script installs the testspace client and configures it to use the +# 2wunder.testspace.com server. It is intended to be used in the +# commands section of a semaphore ci pipeline. +# When sourced it will install the testspace client and adds a function +# called testspace to the current shell. This function can be used independetly +# of the path of this script. + +# Usage: +# source init_testspace.sh +# +# later in the script: +# testspace [arguments] + +install_testspace_client() { + echo "Installing testspace client..." + + # Set the URL based on the current architecture + if [[ $(uname) == "Darwin" ]]; then + url="https://testspace-client.s3.amazonaws.com/testspace-darwin.tgz" + else + url="https://testspace-client.s3.amazonaws.com/testspace-linux.tgz" + fi + + # Install testspace client using curl command + pushd $HOME + curl -fsSL $url | tar -zxvf- -C . + echo "Testspace client installed successfully." + popd +} + + +testspace() { + # Call testspace client with all arguments passed to the function + $HOME/testspace "$@" +} + +install_testspace_client +testspace -v +testspace config url ivailo.stridespace.com From 6110489d70d666c549126b69bf4ebb97e19a52a7 Mon Sep 17 00:00:00 2001 From: Ivailo Petrov <5092875+ivailop@users.noreply.github.com> Date: Sun, 15 Oct 2023 13:55:15 -0700 Subject: [PATCH 3/5] pull-request --- .github/workflows/ci.yml | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index fc2cbd5..bae71bc 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -1,8 +1,9 @@ name: Build on: push: - schedule: - - cron: '0 1 * * 0' + pull_request: + # schedule: + # - cron: '0 1 * * 0' jobs: build: From 1ce0ebbde47355bce27b35d51dbaf9ac0ebc5cae Mon Sep 17 00:00:00 2001 From: Ivailo Petrov <5092875+ivailop@users.noreply.github.com> Date: Sun, 15 Oct 2023 14:01:43 -0700 Subject: [PATCH 4/5] fix --- .semaphore/semaphore.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.semaphore/semaphore.yml b/.semaphore/semaphore.yml index 7c42429..fb90b0b 100644 --- a/.semaphore/semaphore.yml +++ b/.semaphore/semaphore.yml @@ -35,7 +35,7 @@ blocks: always: commands: - printenv - - $HOME/testspace config + - testspace config - cat $HOME/$SEMAPHORE_GIT_DIR/.testspace - testspace +README.md - name: 'Block #2' From 1aaa04185e1fb25a1d69d60e18eacb944e576f0c Mon Sep 17 00:00:00 2001 From: Ivailo Petrov <5092875+ivailop@users.noreply.github.com> Date: Sun, 15 Oct 2023 19:23:09 -0700 Subject: [PATCH 5/5] dev client --- .circleci/config.yml | 2 +- .github/workflows/ci.yml | 2 ++ init_testspace.sh | 2 +- 3 files changed, 4 insertions(+), 2 deletions(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index d5152ee..818ccf5 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -9,7 +9,7 @@ jobs: steps: - checkout - run: sudo apt-get install cmake - - run: "curl -fsSL https://testspace-client.s3.amazonaws.com/testspace-linux.tgz | sudo tar -zxvf- -C /usr/local/bin" + - run: "curl -fsSL https://testspace-client.s3.amazonaws.com/testspace-linux-dev.tgz | sudo tar -zxvf- -C /usr/local/bin" - run: "testspace config url ivailo.stridespace.com" - run: "pip install gcovr" - run: "curl -fsSL https://github.com/google/googletest/archive/refs/tags/v1.14.0.tar.gz | tar -zxvf-" diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index bae71bc..72d8d0a 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -22,6 +22,8 @@ jobs: - uses: testspace-com/setup-testspace@v1 with: domain: ivailo.stridespace.com + env: + TESTSPACE_CLIENT_VER: dev - name: Install GTest run: | curl -fsSL https://github.com/google/googletest/archive/refs/tags/v1.14.0.tar.gz | tar -zxvf- diff --git a/init_testspace.sh b/init_testspace.sh index e2d70e5..60512a6 100644 --- a/init_testspace.sh +++ b/init_testspace.sh @@ -20,7 +20,7 @@ install_testspace_client() { if [[ $(uname) == "Darwin" ]]; then url="https://testspace-client.s3.amazonaws.com/testspace-darwin.tgz" else - url="https://testspace-client.s3.amazonaws.com/testspace-linux.tgz" + url="https://testspace-client.s3.amazonaws.com/testspace-linux-dev.tgz" fi # Install testspace client using curl command