mirror of
https://github.com/allankoechke/jwt-cpp.git
synced 2026-11-30 10:18:40 +00:00
* Fix CMake cache key to use container image fallback * fix cache key for containers * pass cache key in one level higher * store info one level higher again * try $env:ImageOS * capture it from a step maybe * steal cache key logic from setup-go action * cleanup + comment explanation * spelling
87 lines
2.4 KiB
YAML
87 lines
2.4 KiB
YAML
name: Specific Targets CI
|
|
|
|
on:
|
|
push:
|
|
branches: [master]
|
|
pull_request:
|
|
branches: [master]
|
|
paths:
|
|
- "CMakeLists.txt"
|
|
- "cmake/**"
|
|
- "include/jwt-cpp/**"
|
|
- "tests/cmake/**"
|
|
- ".github/actions/**"
|
|
- ".github/workflows/targets.yml"
|
|
|
|
jobs:
|
|
gcc-4-8:
|
|
if: false # There's no existing image with node20 and gcc4.8 https://github.com/actions/checkout/issues/1809
|
|
name: GCC 4.8
|
|
runs-on: ubuntu-latest
|
|
container:
|
|
image: ubuntu:bionic-20230530 # 18.04
|
|
env:
|
|
CC: /usr/bin/gcc-4.8
|
|
CXX: /usr/bin/g++-4.8
|
|
steps:
|
|
- run: |
|
|
apt-get update
|
|
apt-get install -y g++-4.8 wget make libssl-dev
|
|
- uses: actions/checkout@v3 # Can not be upgrade as v4 needs NodeJS 20 doesn't exist next to gcc-4.8
|
|
- uses: ./.github/actions/install/cmake
|
|
with:
|
|
version: "3.26.3"
|
|
url: "https://cmake.org/files/v3.26/cmake-3.26.3.tar.gz"
|
|
|
|
- name: setup
|
|
run: |
|
|
mkdir build
|
|
cd build
|
|
cmake ..
|
|
cmake --build .
|
|
cmake --install .
|
|
- name: test
|
|
working-directory: tests/cmake
|
|
run: |
|
|
CC=gcc-4.8 CXX=g++-4.8 cmake . -DTEST:STRING="defaults-enabled"
|
|
cmake --build .
|
|
|
|
gcc-12:
|
|
name: GCC 12
|
|
runs-on: ubuntu-latest
|
|
strategy:
|
|
matrix:
|
|
# This is to have a variable with the image being used for testing to
|
|
# then be forwarded as part of the cache key since the action internally can not
|
|
# determine it is being ran inside a docker container
|
|
image: [ubuntu:jammy-20231004] # 22.04
|
|
container:
|
|
image: ${{ matrix.image }}
|
|
env:
|
|
CC: /usr/bin/gcc-12
|
|
CXX: /usr/bin/g++-12
|
|
steps:
|
|
- run: |
|
|
apt-get update
|
|
apt-get install -y g++-12 wget make libssl-dev
|
|
- uses: actions/checkout@v4
|
|
- uses: ./.github/actions/install/cmake
|
|
with:
|
|
version: "3.26.3"
|
|
url: "https://cmake.org/files/v3.26/cmake-3.26.3.tar.gz"
|
|
cache-key-extra: ${{ matrix.image }}
|
|
|
|
- name: setup
|
|
run: |
|
|
mkdir build
|
|
cd build
|
|
cmake ..
|
|
cmake --build .
|
|
cmake --install .
|
|
|
|
- name: test
|
|
working-directory: tests/cmake
|
|
run: |
|
|
CC=gcc-12 CXX=g++-12 cmake . -DCMAKE_CXX_STANDARD=20 -DTEST:STRING="defaults-enabled"
|
|
cmake --build .
|