MyGit

git-for-windows/setup-git-for-windows-sdk

Fork: 17 Star: 21 (更新于 2024-12-01 12:45:47)

license: MIT

Language: TypeScript .

A GitHub Action to initialize various flavors of the Git for Windows SDK

最后发布版本: v1.10.4 ( 2024-09-11 01:34:05)

GitHub网址

Set up a Git for Windows SDK (or a subset thereof)

Use this Action to initialize an environment to develop Git for Windows.

Getting Started

name: Build stuff in Git for Windows' SDK
on: [push]
jobs:
  build:
    runs-on: windows-latest
    steps:
    - uses: actions/checkout@v3
    - name: Setup Git for Windows' minimal SDK
      uses: git-for-windows/setup-git-for-windows-sdk@v1
    - name: Build
      shell: bash
      run: make

Input parameters

Available flavors

This Action supports several flavors (read: subsets) of the Git for Windows SDK that can be configured like this:

- uses: git-for-windows/setup-git-for-windows-sdk
  with:
    flavor: build-installers

The supported flavors are:

  • minimal:

    This is the most useful flavor to build Git for Windows' source code and run its own test suite. Only available for x86_64.

  • makepkg-git:

    This flavor allows packaging mingw-w64-git, the Pacman package. It is only available for x86_64 but can be used to "cross-compile" for i686.

  • build-installers:

    In addition to building mingw-w64-git, this flavor allows bundling Git for Windows' artifacts such as the installer and the Portable Git.

  • full:

    This is the "full" SDK, as users would install it, with a pre-selected set of packages pre-installed. Additional packages can be installed via pacman -S <package>.

CPU architecture support

Git for Windows SDK comes in variants targeting x86_64 (AKA "64-bit"), i686 (AKA 32-bit) and aarch64 (AKA arm64). The default is x86_64 and can be overridden like this:

- uses: git-for-windows/setup-git-for-windows-sdk
  with:
    flavor: build-installers
    architecture: i686

Please note that only the build-installers and the full flavors are available for i686.

Verbosity

By default, this Action prints a line whenever 250 items were extracted (this does not work for the full flavor, where this Action is silent by default). It can be overridden by setting the input parameter verbose; setting it to a number will show updates whenever that many items were extracted. Setting it to false will suppress progress updates. Setting it to true will print every extracted file (this also works for the full flavor).

Caching

To accelerate this Action, artifacts are cached once downloaded. This can be turned off by setting the input parameter cache to false.

In practice, caching the full artifacts does not provide much of a speed-up. Instead, it slows it down by spending extra minutes on caching the artifact. Therefore, caching is disabled for the full artifacts by default, corresponding to cache: auto.

Clean-up

On self-hosted runners, the SDK files persist after the workflow run is done. To remove these files, set the input parameter cleanup to true.

Developing this Action

First, you'll need to have a reasonably modern version of node handy, such as Node 12.

Install the dependencies

$ npm install

Build the Action and package it for distribution

$ npm run build && npm run package

Run the tests :heavy_check_mark:

$ npm test

> setup-git-for-windows-sdk@0.0.0 test C:\Users\me\setup-git-for-windows-sdk
> jest

PASS __tests__/main.test.ts (28.869 s)
  √ skipping tests requiring network access (224 ms)

  console.log
    If you want to run tests that access the network, set:
    export RUN_NETWORK_TESTS=true

      at __tests__/main.test.ts:26:13

PASS __tests__/downloader.test.ts (29.889 s)
  √ can obtain build ID (9 ms)

Test Suites: 2 passed, 2 total
Tests:       2 passed, 2 total
Snapshots:   0 total
Time:        31.11 s
Ran all test suites.
...

最近版本更新:(数据更新于 2024-10-18 07:45:41)

2024-09-11 01:34:05 v1.10.4

2024-08-30 00:47:06 v1.10.3

2024-05-13 06:02:25 v1.10.2

2024-05-13 05:01:46 v1.10.1

2023-12-15 08:52:01 v1.10.0

2023-11-13 21:07:23 v1.9.0

2023-02-10 20:04:59 v1.8.1

2023-02-08 19:40:02 v1.8.0

2023-01-03 04:18:24 v1.7.0

2022-12-23 04:16:42 v1.6.2

主题(topics):

actions, github-action

git-for-windows/setup-git-for-windows-sdk同语言 TypeScript最近更新仓库

2024-12-21 21:40:12 lobehub/lobe-chat

2024-12-21 12:01:51 siyuan-note/siyuan

2024-12-21 10:57:01 ai16z/eliza

2024-12-21 09:15:35 MetaCubeX/metacubexd

2024-12-21 04:50:26 mediar-ai/screenpipe

2024-12-20 19:36:48 vitejs/vite