{"id":19549137,"url":"https://github.com/bsfishy/meson-build","last_synced_at":"2025-04-26T20:30:59.271Z","repository":{"id":42990678,"uuid":"245223313","full_name":"BSFishy/meson-build","owner":"BSFishy","description":"Run a Meson task during your Actions workflow","archived":false,"fork":false,"pushed_at":"2023-01-05T09:10:51.000Z","size":321,"stargazers_count":23,"open_issues_count":16,"forks_count":10,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-04-21T00:54:41.263Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/BSFishy.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2020-03-05T17:13:46.000Z","updated_at":"2025-01-19T04:01:31.000Z","dependencies_parsed_at":"2023-02-03T22:16:21.663Z","dependency_job_id":null,"html_url":"https://github.com/BSFishy/meson-build","commit_stats":{"total_commits":27,"total_committers":4,"mean_commits":6.75,"dds":0.2222222222222222,"last_synced_commit":"656b2a360964b249ac82905a52018921e01d875b"},"previous_names":[],"tags_count":4,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/BSFishy%2Fmeson-build","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/BSFishy%2Fmeson-build/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/BSFishy%2Fmeson-build/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/BSFishy%2Fmeson-build/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/BSFishy","download_url":"https://codeload.github.com/BSFishy/meson-build/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":251051289,"owners_count":21528786,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-11-11T03:58:01.582Z","updated_at":"2025-04-26T20:30:58.937Z","avatar_url":"https://github.com/BSFishy.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Meson Build action\n[![Test](https://github.com/BSFishy/meson-build/workflows/Test/badge.svg)](https://github.com/BSFishy/meson-build/actions)\n\nRun a Meson task during your Actions workflow\n\n## Usage\nSee [action.yml](action.yml)\n\nBasic:\n```yaml\nsteps:\n- uses: actions/checkout@v2\n- uses: actions/setup-python@v1\n- uses: BSFishy/meson-build@v1.0.3\n  with:\n    action: test\n```\n\nAll options:\n```yaml\n- uses: BSFishy/meson-build@v1.0.3\n  with:\n    action: test\n    directory: build\n    setup-options: -Db_coverage=true\n    options: --verbose\n    meson-version: 0.53.2\n    ninja-version: 1.9.0.post1\n    gcovr-version: 4.2\n```\n\n### Options\nHere is a list of options that can be used with this action.\n\n#### `action`\nThe action to perform.\nThis specifies what the action should actually be doing.\nIt defines what command is run when it comes time.\n\nNote that the project will always be setup before an action is run.\nBefore the action is run, `meson setup [directory]` will be run to setup the project.\nIf the directory already exists and there is a file name `build.ninja` in it, this step is skipped.\n\nIt should be one of the following values:\n - `build`\n  Simply build the project. This will use Ninja to automatically build the project. Apart from that, no additional tasks are run.\n - `install`\n  Install the project. This will use Meson to install the project to the system.\n - `test`\n  Run unit tests. This will run any unit tests defined in the Meson project, using Meson.\n - `coverage`\n  Run [Gcovr](https://gcovr.com/en/stable/). This will use Meson to find the code coverage of the project.\n  Note that this required Gcovr. If it is not already installed, it will be installed automatically.\n - `tidy`\n  Run [Clang-Tidy](https://clang.llvm.org/extra/clang-tidy/) on the project. This will use Meson to lint the project.\n  Note that this requires Clang-Tidy. If it is not installed, an error will occur.\n\n#### `directory`\nThe directory to build the project in.\nThis will automatically cause all of the commands to run the commands on whatever directory is specified here.\nBy default, the build directory will simply be `build`.\n\nThe build directory can already exist.\nIf the build directory exists before the action is run, it is checked for a `build.ninja` file.\nIf the directory and the `build.ninja` file already exist, nothing is done to setup the project.\nIf either of them are missing, the project is setup using `meson setup`.\n\n#### `setup-options`\nOptions to pass when setting up the project.\nThese are command line arguments that are passed to Meson when setting up the project.\nThis happens when either the `directory` specified or the `build.ninja` inside of the directory does not already exist.\nThis allows you to specify specific options to Meson to build with.\nThe options are passed directly to `meson setup`.\n\n#### `options`\nOptions to pass to the Meson command.\nThese are command line arguments that are passed to whatever Meson command is to be called.\nThis allows you to run the command with specific options.\nThe options are passed directly to whatever command is run without formatting.\n\n#### `meson-version`\nThe version of Meson to install.\nWhenever the action is initially run, it checks if Meson is installed.\nIf Meson is already installed, this part is skipped.\nNote that this means that it won't garuantee that a specific version of Meson is installed.\nIf Meson is not installed when the action is run, it will install it using pip and this version.\n\n#### `ninja-version`\nThe version of Ninja to install.\nWhenever the action is initially run, it checks if Ninja is installed.\nIf Ninja is already installed, this part is skipped.\nNote that this means that it won't garuantee that a specific version of Ninja is installed.\nIf Ninja is not installed when the action is run, it will be installed using pip and this version.\n\n#### `gcovr-version`\nThe version of Gcovr to install.\nWhenever the `coverage` action is run, Gcovr is checked if it is installed.\nIf not, pip will be used to install this version of Gcovr.\n\n### Additional info\nHere is just a little bit of additional information to explain some things that may not be trivial.\n\n#### Lifecycle\nThe lifecycle of the action is fairly important.\nLuckily, it is fairly simple.\nHere is what it looks like:\n\n 1. Process the inputs.\n  First, we need to get all of our inputs and figure out what exactly they are. The main part of this step is to format the `action` input. We just need to make sure it is a valid value.\n 2. Check for Ninja.\n  Next, we need to make sure Ninja is installed. Ninja is a dependency of Meson, so we do a simple check if it is on the current system. If not, it is installed through pip.\n 3. Check for Meson.\n  We also need to make sure Meson is installed. If Meson is not already installed, it is installed through pip.\n 4. Check if the project is setup.\n  We need to check if the project is setup. This will check if the build directory exists and if the `build.ninja` file exists in that directory. If either of those are missing, a `meson setup` command will be called to setup the project. If either of those are missing even after running the setup command, it is assumed that the project has an error, and it exits.\n 5. Build the command.\n  Next, we build the command that is to be run. Based on the action to run, an executable and basic set of arguments are selected that correspond to that command. Any dependencies (i.e. Gcovr or Clang-Tidy) are also installed if their respective actions are used. Finally, the `options` input is appended to the arguments.\n 6. Run the command.\n  Finally, we run the command that was built in the previous step.\n\n## License\n\nThe scripts and documentation in this project are released under the [MIT License](LICENSE)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbsfishy%2Fmeson-build","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fbsfishy%2Fmeson-build","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbsfishy%2Fmeson-build/lists"}