Skip to content

Commit

Permalink
Try to test c++ support with both clang & gcc
Browse files Browse the repository at this point in the history
  • Loading branch information
sylvestre committed Mar 22, 2023
1 parent f757c06 commit 0a6c099
Showing 1 changed file with 98 additions and 0 deletions.
98 changes: 98 additions & 0 deletions .github/workflows/integration-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -398,3 +398,101 @@ jobs:
if: success() || failure()
shell: bash
run: cat "$SCCACHE_ERROR_LOG"


clang:
runs-on: ubuntu-latest
needs: build

env:
LLVM_VERSION: "16"
SCCACHE_GHA_ENABLED: "on"

steps:
- uses: actions/checkout@v3

- name: Configure Cache Env
uses: actions/github-script@v6
with:
script: |
core.exportVariable('ACTIONS_CACHE_URL', process.env.ACTIONS_CACHE_URL || '');
core.exportVariable('ACTIONS_RUNTIME_TOKEN', process.env.ACTIONS_RUNTIME_TOKEN || '')
- name: Install clang
run: |
wget https://apt.llvm.org/llvm.sh
chmod +x llvm.sh
sudo ./llvm.sh "${LLVM_VERSION}"
- uses: actions/download-artifact@v3
with:
name: integration-tests
path: /home/runner/.cargo/bin/
- name: Chmod for binary
run: chmod +x ${SCCACHE_PATH}

- name: Test
run: |
export CXX="${SCCACHE_PATH} clang++"
$CXX -c `pwd`/tests/test_clang_multicall.c
- name: Output
run: |
${SCCACHE_PATH} --show-stats
- name: Test Twice for Cache Read
run: |
rm -f hello_world
export CXX="${SCCACHE_PATH} clang++"
$CXX -c `pwd`/tests/test_clang_multicall.c
- name: Output
run: |
${SCCACHE_PATH} --show-stats
${SCCACHE_PATH} --show-stats | grep -e "Cache hits\s*[1-9]"
gcc:
runs-on: ubuntu-latest
needs: build

env:
SCCACHE_GHA_ENABLED: "on"

steps:
- uses: actions/checkout@v3

- name: Configure Cache Env
uses: actions/github-script@v6
with:
script: |
core.exportVariable('ACTIONS_CACHE_URL', process.env.ACTIONS_CACHE_URL || '');
core.exportVariable('ACTIONS_RUNTIME_TOKEN', process.env.ACTIONS_RUNTIME_TOKEN || '')
- uses: actions/download-artifact@v3
with:
name: integration-tests
path: /home/runner/.cargo/bin/
- name: Chmod for binary
run: chmod +x ${SCCACHE_PATH}

- name: Test
run: |
export CXX="${SCCACHE_PATH} g++"
$CXX -c `pwd`/tests/test_clang_multicall.c
- name: Output
run: |
${SCCACHE_PATH} --show-stats
- name: Test Twice for Cache Read
run: |
rm -f hello_world
export CXX="${SCCACHE_PATH} g++"
$CXX -c `pwd`/tests/test_clang_multicall.c
- name: Output
run: |
${SCCACHE_PATH} --show-stats
${SCCACHE_PATH} --show-stats | grep -e "Cache hits\s*[1-9]"

0 comments on commit 0a6c099

Please sign in to comment.