Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Meson] CI for meson project #403

Closed
UnixY2K opened this issue Jan 3, 2023 · 3 comments
Closed

[Meson] CI for meson project #403

UnixY2K opened this issue Jan 3, 2023 · 3 comments
Assignees

Comments

@UnixY2K
Copy link
Contributor

UnixY2K commented Jan 3, 2023

Description

Happy new Year!

As Meson support is becoming more stable it would be good to have a CI for the meson project so we can check any bug or edge case like #394 or #378 this issue should be a good starting point in order to define how the CI should look like along with any feedback that is required in order to complete it, additionally having this CI will help us add any new feature that may not be included con CMake or Meson itself so it can be fixed and tested carefully before merging

an initial proposed format should look like the example of the first comment
as you may notice it is pretty similar to the CI that is already in CMake, but needs to be checked/reviewed first in order to check if everything is working good before opening a PR.

please let me know what do you think or if you have any idea/sugestion.

@UnixY2K
Copy link
Contributor Author

UnixY2K commented Jan 3, 2023

name: build

on: [push, pull_request]

jobs:
  build:
    name: ${{ matrix.config.name }}
    runs-on: ${{ matrix.config.os }}
    strategy:
      fail-fast: false
      matrix:
        config:
        - {
            name: "Windows Latest MSVC",
            os: windows-latest,
            generator: "Visual Studio 17 2022",
            build_type: "Debug",
            cc: "cl", cxx: "cl",
            extra_path: "",
          }
        - {
            name: "Windows Latest MinGW",
            os: windows-latest,
            generator: "MinGW Makefiles",
            build_type: "Debug",
            cc: "gcc", cxx: "g++",
            extra_path: "C:\\ProgramData\\chocolatey\\lib\\mingw\\tools\\install\\mingw64\\bin",
          }
        - {
            name: "Ubuntu Latest GCC",
            os: ubuntu-latest,
            generator: "Unix Makefiles",
            build_type: "Debug",
            cc: "gcc", cxx: "g++",
            extra_path: ""
          }
        - {
            name: "macOS Latest Clang",
            os: macos-latest,
            generator: "Unix Makefiles",
            build_type: "Debug",
            cc: "clang", cxx: "clang++",
            extra_path: ""
          }

    steps:
    - uses: actions/checkout@v2
    - name: submodule
      run: git submodule update --init --recursive
    - name: extra_path
      shell: bash
      run: echo "${{matrix.config.extra_path}}" >> $GITHUB_PATH
    - name: configure
      shell: cmake -P {0}
      run: |
        set(ENV{CC} ${{matrix.config.cc}})
        set(ENV{CXX} ${{matrix.config.cxx}})
    - name: install prerequisites
      run: |
        # asuming that python and pip are already installed
        pip3 install meson
    - name: setup meson project
      run: |
        # setup the build directory with tests and examples enabled
        meson setup builddir -DSQLITECPP_BUILD_TESTS=true -DSQLITECPP_BUILD_EXAMPLES=true
    - name: build meson project
      run: |
        # build the project
        meson compile -C builddir
    - name: test
      run: |
        # run the tests
        meson test -C builddir

@SRombauts SRombauts self-assigned this Feb 9, 2023
@SRombauts
Copy link
Owner

This is awesome!
And yes obviously we do need Meson to be tested by the build system: everything should be tested on CI, and as you say it's becoming more mature.

As for reviewing it, it seems good to me, but I am not a meson expert; I think we will discover the little details as soon as you try to propose a PR
(in fact, you might not even be allowed to provide a new Github Action file in a PR, but this I can remediate :) )

UnixY2K added a commit to UnixY2K/SQLiteCpp that referenced this issue Feb 10, 2023
PR for SRombauts#403, which adds the base meson pipeline
@UnixY2K
Copy link
Contributor Author

UnixY2K commented Feb 13, 2023

PR opened in #407 that should include it and solve this issue

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants