Skip to content

Commit

Permalink
Working on CI/CD
Browse files Browse the repository at this point in the history
  • Loading branch information
scharlton2 committed Jan 7, 2025
1 parent ee08a7b commit 42f3811
Show file tree
Hide file tree
Showing 2 changed files with 65 additions and 9 deletions.
68 changes: 62 additions & 6 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,19 +5,25 @@ on:
types: [opened, synchronize, reopened, ready_for_review]
paths-ignore:
- '.github/workflows/dist.yml'
- '.github/workflows/wheels.yml'
- '.gitignore'
- 'build-all-presets.sh'
- 'CMakePresets.json'
- 'doc/**'
- '!doc/CMakeLists.txt'
- '!doc/Makefile.am'
- 'HTMLversion/**'
- 'Version3/**'
- 'README.md'
push:
# branches:
# - master
paths-ignore:
- '.github/workflows/dist.yml'
- '.github/workflows/wheels.yml'
- '.gitignore'
- 'build-all-presets.sh'
- 'CMakePresets.json'
- 'doc/**'
- '!doc/CMakeLists.txt'
- '!doc/Makefile.am'
- 'HTMLversion/**'
- 'Version3/**'
- 'README.md'
workflow_dispatch:
inputs:
date:
Expand Down Expand Up @@ -494,3 +500,53 @@ jobs:
# run: |
# $env:PATH="${{ env.VCPKG_INSTALLATION_ROOT }}\packages\yaml-cpp_x64-windows\bin;C:\Program Files (x86)\PhreeqcRM\bin;$env:PATH"
# ctest -C ${{ env.BUILD_TYPE }} --output-on-failure


cmake:
# if: ${{ false }}
name: ${{ matrix.os }} type=${{ matrix.BUILD_TYPE }}
needs: [init, distcheck]
strategy:
fail-fast: false
matrix:
os: [macos-13, ubuntu-20.04, ubuntu-22.04, ubuntu-24.04, windows-2019, windows-2022]
BUILD_TYPE: [Debug, Release]

runs-on: ${{ matrix.os }}

env:
VER_STRING: ${{ needs.init.outputs.VER }}-${{ needs.init.outputs.REL }}

steps:

- uses: actions/download-artifact@v4
with:
# name: tarball
name: phreeqc-artifacts

- name: Install ninja (Linux)
if: ${{ runner.os == 'Linux' }}
run: |
sudo apt-get -y update
sudo apt-get install -y ninja-build
- name: Install ninja(macOS)
if: ${{ runner.os == 'macOS' }}
run: |
brew install ninja
ls -alR /usr/local/Cellar/
- name: Set up Visual Studio shell (Windows)
if: runner.os == 'Windows'
uses: egor-tensin/vs-shell@v2
with:
arch: x64

- name: Extract tarball
run: tar xvzf phreeqc-${{ env.VER_STRING }}.tar.gz

- name: Configure with CMake
run: cmake -L -G Ninja -B build -S phreeqc-${{ env.VER_STRING }} -DCMAKE_BUILD_TYPE=${{ matrix.BUILD_TYPE }}

- name: Build with CMake
run: cmake --build ${{ github.workspace }}/build --config ${{ matrix.BUILD_TYPE }}
6 changes: 3 additions & 3 deletions .github/workflows/cmake.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@ name: CMake

on:
push:
branches:
- master
- develop
# branches:
# - master
# - develop
paths-ignore:
- 'doc/**'
- '!doc/CMakeLists.txt'
Expand Down

0 comments on commit 42f3811

Please # to comment.