Skip to content

Commit

Permalink
efe
Browse files Browse the repository at this point in the history
  • Loading branch information
wardru committed Dec 10, 2023
1 parent e4c055d commit f176fe9
Show file tree
Hide file tree
Showing 5 changed files with 3,055 additions and 24 deletions.
55 changes: 32 additions & 23 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,19 +7,14 @@ jobs:
runs-on: ubuntu-latest
container:
image: ghcr.io/panduza/pzacxx-build-img:latest
options: --user 1001
strategy:
matrix:
os: [linux]
compiler: [gcc]
build_type: [Debug]
shared: ["True", "False"]
os: [linux, windows]
compiler: [gcc, clang]
build_type: [debug, release]
lib_type: [shared, static]
exclude:
- os: linux
compiler: mingw
- os: win
compiler: gcc
- os: win
- os: windows
compiler: clang
steps:
- name: Checkout
Expand All @@ -30,23 +25,37 @@ jobs:
run: pacman -S --noconfirm nodejs

- name: "cache"
uses: actions/cache@v2
uses: actions/cache@v3
with:
path: ~/.conan2/p
key: conan-cache-${{ matrix.os }}-${{ matrix.compiler }}-${{ matrix.build_type }}-${{ matrix.shared }}
key: conan-cache-${{ matrix.os }}-${{ matrix.compiler }}-${{ matrix.build_type }}-${{ matrix.lib_type }}

- name: "Install"
run:
conan install -pr:b ./conan_profiles/linux_gcc -pr:h ./conan_profiles/${{ matrix.os }}_${{ matrix.compiler }} --build=missing -s build_type=${{ matrix.build_type }} -o shared=${{ matrix.shared }} .
- id: build_type
uses: ASzc/change-string-case-action@v6
with:
string: ${{ matrix.build_type }}

- name: "Build"
- name: "Install"
run: |
if [ "${{ matrix.shared }}" = "True" ]; then
lib_type="shared"
if [ "${{ matrix.lib_type }}" = "static" ]; then
shared="False"
else
lib_type="static"
shared="True"
fi
ls -l build
echo "build folder: ./build/${{ matrix.os }}-${{ matrix.compiler }}-$lib_type"
cmake --preset ${{ matrix.os }}-${{ matrix.compiler }}-$lib_type
cmake --build ./build/${{ matrix.os }}-${{ matrix.compiler }}-$lib_type --config ${{ matrix.build_type }}
echo "LOL : ${{ matrix.os }}_${{ matrix.compiler }}"
conan install -pr:b ./conan_profiles/linux_gcc -pr:h ./conan_profiles/${{ matrix.os }}_${{ matrix.compiler }} --build=missing -s build_type=${{ steps.build_type.outputs.capitalized }} -o shared=$shared .
- name: "Build for ${{ matrix.os }}-${{ matrix.compiler }}-${{ matrix.lib_type }}-${{ matrix.build_type }}"
run: |
cmake --preset ${{ matrix.os }}-${{ matrix.compiler }}-${{ matrix.lib_type }}
cmake --build --preset ${{ matrix.os }}-${{ matrix.compiler }}-${{ matrix.lib_type }}-${{ matrix.build_type }}
- name: "Test for ${{ matrix.os }}-${{ matrix.compiler }}-${{ matrix.lib_type }}-${{ matrix.build_type }}"
run: |
echo "Test for ${{ matrix.os }}-${{ matrix.compiler }}-${{ matrix.lib_type }}-${{ matrix.build_type }}"
- name: "Coverage"
if: ${{ matrix.os == 'linux' && matrix.compiler == 'gcc' && matrix.build_type == 'debug' && matrix.lib_type == 'static' }}
run: |
echo "Coverage for ${{ matrix.os }}-${{ matrix.compiler }}-${{ matrix.lib_type }}-${{ matrix.build_type }}"
Loading

0 comments on commit f176fe9

Please sign in to comment.