Skip to content

Commit

Permalink
Github action update
Browse files Browse the repository at this point in the history
  • Loading branch information
davidhjp01 committed Feb 14, 2024
1 parent 26be36b commit b4a628d
Show file tree
Hide file tree
Showing 2 changed files with 62 additions and 6 deletions.
36 changes: 32 additions & 4 deletions .github/workflows/build-and-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,12 +15,26 @@ jobs:
- uses: actions/checkout@v4
- name: Install Conan
uses: turtlebrowser/get-conan@main
- name: Create a conan dir
run: mkdir -p ~/.conan2
- name: Cache conan packages
id: cache-conan
uses: actions/cache@v3
env:
cache-name: cache-conan-packages
with:
path: ~/.conan2
key: ${{ runner.os }}-${{ matrix.build_type }}-${{ env.cache-name }}-${{ hashFiles('**/conan.lock') }}
restore-keys: |
${{ runner.os }}-${{ matrix.build_type }}-${{ env.cache-name }}-
${{ runner.os }}-${{ matrix.build_type }}-
${{ runner.os }}-
- name: Configure Conan
run: |
conan profile detect
conan profile detect -f
conan remote add osp https://osp.jfrog.io/artifactory/api/conan/conan-local --force
- name: Install dependencies
run: conan install --build=missing --output-folder=build -s build_type=${{ matrix.build_type }} .
run: conan install --build=missing --output-folder=build -s build_type=${{ matrix.build_type }} --lockfile-out ~/.conan2/conan.lock .
- name: Generate build system
run: cmake --preset conan-$(echo ${{ matrix.build_type }} | tr '[:upper:]' '[:lower:]') -DPROXYFMU_BUILD_EXAMPLES=ON -DPROXYFMU_BUILD_TESTS=ON
- name: Build
Expand All @@ -47,12 +61,26 @@ jobs:
- uses: actions/checkout@v4
- name: Install Conan
uses: turtlebrowser/get-conan@main
- name: Create a conan dir
run: mkdir -p ~/.conan2
- name: Cache conan packages
id: cache-conan
uses: actions/cache@v3
env:
cache-name: cache-conan-packages
with:
path: ~/.conan2
key: ${{ runner.os }}-${{ matrix.build_type }}-${{ env.cache-name }}-${{ hashFiles('**/conan.lock') }}
restore-keys: |
${{ runner.os }}-${{ matrix.build_type }}-${{ env.cache-name }}-
${{ runner.os }}-${{ matrix.build_type }}-
${{ runner.os }}-
- name: Configure Conan
run: |
conan profile detect
conan profile detect -f
conan remote add osp https://osp.jfrog.io/artifactory/api/conan/conan-local --force
- name: Install dependencies
run: conan install --build=missing --output-folder=build -s build_type=${{ matrix.build_type }} .
run: conan install --build=missing --output-folder=build -s build_type=${{ matrix.build_type }} --lockfile-out ~/.conan2/conan.lock .
- name: Generate build system
run: cmake --preset conan-default -DPROXYFMU_BUILD_EXAMPLES=ON -DPROXYFMU_BUILD_TESTS=ON
- name: Build
Expand Down
32 changes: 30 additions & 2 deletions .github/workflows/upload-conan-pkgs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,11 +27,25 @@ jobs:
- uses: actions/checkout@v4
- name: Install compiler
run: sudo apt-get install -y --no-install-recommends g++-${{ matrix.compiler_version }}
- name: Create a conan dir
run: mkdir -p ~/.conan2
- name: Cache conan packages
id: cache-conan
uses: actions/cache@v3
env:
cache-name: cache-conan-packages
with:
path: ~/.conan2
key: ${{ runner.os }}-${{ matrix.build_type }}-${{ env.cache-name }}-${{ hashFiles('**/conan.lock') }}
restore-keys: |
${{ runner.os }}-${{ matrix.build_type }}-${{ env.cache-name }}-
${{ runner.os }}-${{ matrix.build_type }}-
${{ runner.os }}-
- name: Install Conan
uses: turtlebrowser/get-conan@main
- name: Configure Conan
run: |
conan profile detect
conan profile detect -f
conan remote add osp https://osp.jfrog.io/artifactory/api/conan/conan-local --force
- name: Conan create
run: |
Expand Down Expand Up @@ -59,11 +73,25 @@ jobs:

steps:
- uses: actions/checkout@v4
- name: Create a conan dir
run: mkdir -p ~/.conan2
- name: Cache conan packages
id: cache-conan
uses: actions/cache@v3
env:
cache-name: cache-conan-packages
with:
path: ~/.conan2
key: ${{ runner.os }}-${{ matrix.build_type }}-${{ env.cache-name }}-${{ hashFiles('**/conan.lock') }}
restore-keys: |
${{ runner.os }}-${{ matrix.build_type }}-${{ env.cache-name }}-
${{ runner.os }}-${{ matrix.build_type }}-
${{ runner.os }}-
- name: Install Conan
uses: turtlebrowser/get-conan@main
- name: Configure Conan
run: |
conan profile detect
conan profile detect -f
conan remote add osp https://osp.jfrog.io/artifactory/api/conan/conan-local --force
- name: Conan create
shell: bash
Expand Down

0 comments on commit b4a628d

Please sign in to comment.