From d7061cc18c2de92695df245a2f2541e96a2cdd2a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mika=C3=ABl=20Capelle?= Date: Tue, 19 Sep 2023 18:28:49 +0200 Subject: [PATCH] Add Github workflows. --- .github/workflows/build.yml | 16 ++++++++++++++++ .github/workflows/linting.yml | 18 ++++++++++++++++++ src/tasks/boost.cpp | 4 ++-- src/tasks/openssl.cpp | 10 +++++----- src/tasks/pyqt.cpp | 27 ++++++++++++++------------- 5 files changed, 55 insertions(+), 20 deletions(-) create mode 100644 .github/workflows/build.yml create mode 100644 .github/workflows/linting.yml diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml new file mode 100644 index 0000000..935b9e1 --- /dev/null +++ b/.github/workflows/build.yml @@ -0,0 +1,16 @@ +name: Build Mob + +on: + push: + branches: master + pull_request: + types: [opened, synchronize, reopened] + +jobs: + build: + runs-on: windows-2022 + steps: + - uses: actions/checkout@v4 + - name: Build Mob + shell: pwsh + run: ./bootstrap.ps1 -Verbose diff --git a/.github/workflows/linting.yml b/.github/workflows/linting.yml new file mode 100644 index 0000000..7a3ae42 --- /dev/null +++ b/.github/workflows/linting.yml @@ -0,0 +1,18 @@ +name: Lint Mob + +on: + push: + pull_request: + types: [opened, synchronize, reopened] + +jobs: + lint: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v3 + - name: Run clang-format + uses: jidicula/clang-format-action@v4.11.0 + with: + clang-format-version: "16" + check-path: "." + exclude-regex: "third-party" diff --git a/src/tasks/boost.cpp b/src/tasks/boost.cpp index 5534073..b5108e7 100644 --- a/src/tasks/boost.cpp +++ b/src/tasks/boost.cpp @@ -296,8 +296,8 @@ namespace mob::tasks { "(\\d+)" // 72 "(?:" "\\.(\\d+)" // .0 - "(?:" - "-(.+)" // -b1-rc1 + "(?:" // + "-(.+)" // -b1-rc1 ")?" ")?"); diff --git a/src/tasks/openssl.cpp b/src/tasks/openssl.cpp index 4a8346d..5b1f502 100644 --- a/src/tasks/openssl.cpp +++ b/src/tasks/openssl.cpp @@ -214,12 +214,12 @@ namespace mob::tasks { { // 1.2.3d // everything but 1 is optional - std::regex re("(\\d+)" // 1 - "(?:" - "\\.(\\d+)" // .2 - "(?:" + std::regex re("(\\d+)" // 1 + "(?:" // + "\\.(\\d+)" // .2 + "(?:" // "\\.(\\d+)([a-zA-Z]+)?" // .3d - ")?" + ")?" // ")?"); std::smatch m; diff --git a/src/tasks/pyqt.cpp b/src/tasks/pyqt.cpp index da2e2c9..d43f231 100644 --- a/src/tasks/pyqt.cpp +++ b/src/tasks/pyqt.cpp @@ -208,19 +208,20 @@ namespace mob::tasks { op::delete_directory(cx(), source_path() / "build", op::optional); // build modules - run_tool(process_runner( - process() - .binary(sip::sip_install_exe()) - .arg("--confirm-license") - .arg("--verbose", process::log_trace) - .arg("--pep484-pyi") - .arg("--link-full-dll") - .arg("--build-dir", build_path()) - // .arg("--enable", "pylupdate") // these are not in modules - //so they .arg("--enable", "pyrcc") // don't get copied below - // .args(zip(repeat("--enable"), modules())) - .cwd(source_path()) - .env(pyqt_env))); + run_tool(process_runner(process() + .binary(sip::sip_install_exe()) + .arg("--confirm-license") + .arg("--verbose", process::log_trace) + .arg("--pep484-pyi") + .arg("--link-full-dll") + .arg("--build-dir", build_path()) + // .arg("--enable", + //"pylupdate") // these are not in modules so + // they .arg("--enable", "pyrcc") // don't + // get copied below + // .args(zip(repeat("--enable"), modules())) + .cwd(source_path()) + .env(pyqt_env))); // done, create the bypass file built_bypass.create();