setup-msys2 is a JavaScript GitHub Action (GHA) to setup an MSYS2 environment (i.e. MSYS,MINGW32, MINGW64, UCRT64, CLANG32, and/or CLANG64 shells) using the GHA toolkit forautomatic caching.
MSYS2 is available by default in windows-latestvirtual environment for GitHub Actions, located at C:\msys64
.Moreover, there is work in progress for making bash
default to MSYS2 (see actions/virtual-environments#1525).However, the default installation has some caveats at the moment (see actions/virtual-environments#1572):
shell
option.setup-msys2 works around those constraints:
release: false
, the default installation is used, but automatic caching is supported and a customentrypoint is provided.release: true
), setup-msys2 downloads and extracts the latest tarball available at repo.msys2.org/distrib/x86_64,a clean and up-to-date environment is set up in a temporary location, and a custom entrypoint (msys2
) is provided.Hence, the overhead of updating pre-installed but unnecessary packages is avoided.Therefore, usage of this Action is recommended to all MSYS2 users of GitHub Actions, since caching and the customentrypoint are provided regardless of option release
.
- uses: msys2/setup-msys2@v2
Then, for scripts:
- shell: msys2 {0}
run: |
uname -a
It is also possible to execute specific commands from cmd/powershell scripts/snippets.In order to do so, -c
is required:
- shell: powershell
run: msys2 -c 'uname -a'
- shell: cmd
run: msys2 -c 'uname -a'
In order to reduce verbosity, it is possible to set msys2
as the default shell. For example:
defaults:
run:
shell: msys2 {0}
steps:
- uses: msys2/setup-msys2@v2
with:
update: true
install: >-
base-devel
git
#- run: git config --global core.autocrlf input
# shell: bash
- uses: actions/checkout@v2
- run: git describe --dirty
Note that setting autocrlf
is required in specific use cases only.See actions/checkout#250.
It is common to test some package/tool on multiple environments, which typically requires installing different sets ofpackages through option install
.GitHub Actions' strategy
and matrix
fields allow to do so, as explained in docs.github.com: Configuring a build matrixand docs.github.com: jobs.<job_id>.strategy.matrix
.See, for instance:
strategy:
matrix:
include:
- { sys: mingw64, env: x86_64 }
- { sys: mingw32, env: i686 }
- { sys: ucrt64, env: ucrt-x86_64 } # Experimental!
- { sys: clang64, env: clang-x86_64 } # Experimental!
steps:
- uses: msys2/setup-msys2@v2
with:
msystem: ${{matrix.sys}}
install: mingw-w64-${{matrix.env}}-openssl
Alternatively, option pacboy
allows using a single matrix variable:
strategy:
matrix:
sys:
- mingw64
- mingw32
- ucrt64 # Experimental!
- clang64 # Experimental!
steps:
- uses: msys2/setup-msys2@v2
with:
msystem: ${{matrix.sys}}
pacboy: openssl:p
Find similar patterms in the following workflows:
Find further details at #171 and #102.
By default, MSYSTEM
is set to MINGW64
. However, an optional parameter named msystem
is supported, which expectsMSYS
, MINGW64
, MINGW32
, UCRT64
, CLANG32
or CLANG64
.For example:
- uses: msys2/setup-msys2@v2
with:
msystem: MSYS
Furthermore, the environment variable can be overridden.This is useful when multiple commands need to be executed in different contexts.For example, in order to build a PKGBUILD file and then test the installed artifact:
- uses: msys2/setup-msys2@v2
with:
msystem: MSYS
- shell: msys2 {0}
run: |
makepkg-mingw -sCLfc --noconfirm --noprogressbar
pacman --noconfirm -U mingw-w64-*-any.pkg.tar.xz
- run: |
set MSYSTEM=MINGW64
msys2 -c '<command to test the package>'
Defines which parts of the Windows $env:PATH
environment variable leak into the MSYS2 environment.Allowed values:
strict
: do not inherit anything from $env:PATH
.minimal
(default): only inherit the default Windows paths from $env:PATH
(so that cmd.exe
and powershell.exe
are available for example).inherit
: inherit everything; warning: this can lead to interference with other tools installed on the system.- uses: msys2/setup-msys2@v2
with:
path-type: minimal
This option corresponds to the MSYS2_PATH_TYPE
setting in MSYS2; hence it can be set per step through env
.See msys2/MSYS2-packages: filesystem/profilefor further details about the configuration of each option.
By default, the installation is not updated; hence package versions are those of the installation tarball.By setting option update
to true
, the action will try to update the runtime and packages cleanly:
- uses: msys2/setup-msys2@v2
with:
update: true
Installing additional packages after updating the system is supported through option install
.The package or list of packages are installed through pacman --noconfirm -S --needed --overwrite *
.
- uses: msys2/setup-msys2@v2
with:
update: true
install: >-
git
base-devel
Installing additional packages with pacboy after updating the system is supported through option pacboy
.The package or list of packages are installed through pacboy --noconfirm -S --needed
.
strategy:
fail-fast: false
matrix:
sys: [ MINGW64, MINGW32, UCRT64, CLANG64 ]
steps:
- uses: msys2/setup-msys2@v2
with:
msystem: ${{matrix.sys}}
install: >-
git
base-devel
pacboy: >-
openssl:p
By default (true
), retrieve and extract base installation from upstream GitHub Releases.If set to false
, the installation available in the virtual environment is used:
- uses: msys2/setup-msys2@v2
with:
release: false
Specify the location where to install msys2:
- uses: msys2/setup-msys2@v2
with:
location: D:\
By default (fatal
), throw an error if the runner OS is not Windows.If set to warn
, simply log a message and skip the rest:
- uses: msys2/setup-msys2@v2
with:
platform-check-severity: warn
MSYS2是什么 MSYS2 (Minimal SYStem 2) 是一个MSYS的独立改写版本,主要用于 shell 命令行开发环境。同时它也是一个在Cygwin (POSIX 兼容性层) 和 MinGW-w64(从"MinGW-生成")基础上产生的,追求更好的互操作性的 Windows 软件。 MSYS2 [1] 是MSYS的一个升级版,准确的说是集成了pacman和Mingw-w64的Cyg
安装: 选择从互联网安装, 在"User URL"处输入以下地址 http://mirrors.163.com/cygwin/ home路径: 一般位于cygwin安装目录下 cgwin下获取完整路径: cygpath -dm "`pwd`" 切换到其他磁盘: 直接运行df -h命令,发现c,d,e等默认已经挂载了 How to add commands for Cygwin: 1.Downl
Trying to install xgboost is failing..? The version is Anaconda 2.1.0 (64-bit) on Windows & enterprise. How do I proceed? I have been using R it seems its quite easy to install new package in R from R
msys2 =================================== MSYS2 provides two versions of make, one in the make package and one in the mingw-w64-{i686,x86_64}-make packages. The latter one is called mingw32-make
MinGW是Minimalist GNU for Windows的缩写,是本地Windows应用的极简开发环境。 MinGW为本地MS-Windows应用的开发提供了完整的开源编程工具集,而且不依赖于第三方C运行时DLL。(它确实依赖于很多由微软提供的DLL,这些DLL是操作系统的一部分。其中最主要的是MSVCRT.DLL,即微软C运行时库。此外,线程应用必须附带一个可自由发布的线程支持DLL,作
(一)环境准备 安装 MSYS2 https://github.com/msys2/msys2/wiki/MSYS2-installation 安装 MinGW-w64 打开 MSYS2 MinGW 64bit(只是一个独立环境),用 pacman 安装 MinGW-w64 pacman -S mingw-w64-x86_64-gcc pacman -S mingw-w64-x86_64-lib
MOAC release Download from latest release version of VNOE from release link Debian/Ubuntu/CentOS Untar the file using tar, under the directory, run ./moac To see the help, use ./moac --help To enable
Setup 各种情况下配置的说明文档。 包括: ca-setup.md:搭建证书管理(CA)节点。 Chaincode-setup.md:如何搭建编写 chaincode 的环境; JAVAChaincode.md:开发 Java 语言的 chaincode; logging-control.md:调整日志级别等; Network-setup.md:集群环境下的一些配置信息; NodeSDK-se
描述 (Description) data-magellan属性包含在容器中。 它可以用于任何导航元素,如菜单; 必须为必须链接到页面导航的每个部分提供唯一id 。 例子 (Example) 以下示例演示了在基金会中使用magellan设置 - <!DOCTYPE html> <html> <head> <title>Foundation Template</title>
This introduction to TinyMCE configuration section details important options used in traditional form-based layouts, useful information for creating streamlined user experiences and examples of using
Setup source aws-alias.sh aws-start aws-ssh Shutdown aws-stop
Vim users can install either vim-prettier, which is Prettier specific, or Neoformat or ALE which are generalized lint/format engines with support for Prettier. vim-prettier See the vim-prettier readme