提问人:Alix Blaine 提问时间:11/7/2023 更新时间:11/7/2023 访问量:38
MinGw GCC MSYS Github 构建操作
MinGw GCC MSYS Github Build Action
问:
我正在做我的一个副业。在 Windows 上,我只是运行,然后我只是运行:一切正常。现在,我正在尝试使用 GitHub Workflows 实现相同的目标。cmake . -G "MinGw Makefiles"
cmake --build .
我的yaml:
name: MinGW GCC
on:
push:
branches: [ "master" ]
pull_request:
branches: [ "master" ]
env:
# Customize the CMake build type here (Release, Debug, RelWithDebInfo, etc.)
BUILD_TYPE: Release
jobs:
build:
name: MinGW GCC
runs-on: windows-latest
timeout-minutes: 15
defaults:
run:
shell: bash
steps:
- uses: msys2/setup-msys2@v2
with:
update: true
install: >-
cmake
mingw-w64-cmake
mingw-w64-extra-cmake-modules
- name: "Setup"
run: |
gcc --version
- name: CMake Generation
shell: cmd
run: cmake . -G "MinGW Makefiles"
- name: Build Project
shell: cmd
run: cmake --build .
错误信息:
Installing additional packages through pacman...
C:\Windows\system32\cmd.exe /D /S /C D:\a\_temp\setup-msys2\msys2.cmd -c "'pacman' '--noconfirm' '-S' '--needed' '--overwrite' '*' 'cmake' 'mingw-w64-cmake' 'mingw-w64-extra-cmake-modules'"
error: target not found: mingw-w64-cmake
error: target not found: mingw-w64-extra-cmake-modules
Error: The process 'C:\Windows\system32\cmd.exe' failed with exit code 1
答: 暂无答案
评论
ubuntu-latest
sudo apt install -y gcc-mingw-w64
cmake
pacman
cmake
mingw-w64-cmake
mingw-w64-extra-cmake-modules