Giter Site home page Giter Site logo

zero-overhead / app-workflows-github Goto Github PK

View Code? Open in Web Editor NEW
1.0 1.0 1.0 164 KB

Ready-to-use workflows for cross-platform Raku module development

Home Page: https://raku.land/zef:zero-overhead/App::Workflows::Github

License: Artistic License 2.0

Raku 100.00%
raku workflows automation ci-cd module-workflow modules raku-module rakulang cross-platform linux

app-workflows-github's Introduction

last push Linux Status MacOS Status Windows Status
scheduled check Linux Status MacOS Status Windows Status

NAME

App::Workflows::Github - a CI/CD workflow collection for Raku Module developers.

SYNOPSIS

zef install App::Workflows::Github
cd your-module-directory
create-workflows-4-github

DESCRIPTION

last version downloads

App::Workflows::Github is collecting Github workflows for testing your Module on Linux, MacOS and Windows.

Scheduled workflows only run automatically on github if the .yml files are pushed to the default branch - usually 'main'.

Microsoft Windows

If you are on Windows and can not use WSL: consider switching off the maximum-path-length-limitation in case of failed tests during installation.

New-ItemProperty -Path "HKLM:\SYSTEM\CurrentControlSet\Control\FileSystem" -Name "LongPathsEnabled" -Value 1 -PropertyType DWORD -Force

You might get away with temporarily setting TEMP to a short path.

set TEMP=D:\T

mkdir -Force %TEMP%
set TMP=%TEMP%
set ZEF_CONFIG_TEMPDIR=%TEMP%

Installation

Linux/MacOS/Windows install module command:

zef install App::Workflows::Github

Finally execute the following commands:

cd your-module-directory
create-workflows-4-github

This will create or overwrite the following files:

your-module-directory/.github/workflows/runner.yml
your-module-directory/.github/workflows/dispatch.yml
your-module-directory/.github/workflows/Linux.yml
your-module-directory/.github/workflows/MacOS.yml
your-module-directory/.github/workflows/Windows.yml
your-module-directory/run-tests.raku

Then do the usual three git steps to push the changes to github.

git add .github/workflows/
git add run-tests.raku

git commit -m"adding github workflows"

git push

Workflow Dispatch

To dispatch a workflow run using gh CLI use e.g.

cd your-module-directory

echo '{"verbosity":"debug", "os":"windows", "ad_hoc_pre_command":"pwd", "ad_hoc_post_command":"ls -alsh", "os_version":"2019", "raku_version":"2023.02", "run_prove6":"true", "install_module":"true", "run_tests_script":"true", "skip_deps_tests":"false"}' > run_parameters.json
cat run_parameters.json | gh workflow run 'dispatch' --ref branch-to-run-on --json

For 'os' you can choose any of 'ubuntu|macos|windows'. For 'os_version' check supported-runners-and-hardware-resources. For available 'raku_version' check here.

screenshot of dispatch menu

Open https://github.com/your-name/your-module/actions to check the workflow results or dispatch a run via browser.

AUTHOR

rcmlz [email protected]

COPYRIGHT AND LICENSE

Copyright 2023 rcmlz

This library is free software; you can redistribute it and/or modify it under the Artistic License 2.0.

app-workflows-github's People

Contributors

rcmlz avatar

Stargazers

 avatar

Watchers

 avatar

Forkers

rcmlz

app-workflows-github's Issues

Remove `--lib` flag from `prove6` usage

Just saw this on the Rakudo Weekly News, nice work!

I noticed one thing that I think could be improved: remove the use of --lib with prove6.

From this:

    - name: Run prove6
      if: ${{ inputs.run_prove6 }}
      run: |
        zef install --/test --fetch-degree=${{ env.zef_fetch_degree }} --test-degree=${{ env.zef_test_degree }} App::Prove6

        prove6 --version

        prove6 --jobs ${{ env.zef_test_degree }} --lib --timer --verbose

To this:

    - name: Run prove6
      if: ${{ inputs.run_prove6 }}
      run: |
        zef install --/test --fetch-degree=${{ env.zef_fetch_degree }} --test-degree=${{ env.zef_test_degree }} App::Prove6

        prove6 --version

        prove6 --jobs ${{ env.zef_test_degree }} --timer --verbose

The reason being is the module and its dependencies have been installed, so there is no reason to add lib to the repository chain. More importantly though is that it will end up with the module being precompiled twice: once on the install, and once again when the lib directory gets used (which is different from what just got installed).

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.