Skip to content

Instantly share code, notes, and snippets.

@dominicletz
Last active March 25, 2021 14:51
Show Gist options
  • Save dominicletz/5e50c49aa1bf30d2485f5bece177c82f to your computer and use it in GitHub Desktop.
Save dominicletz/5e50c49aa1bf30d2485f5bece177c82f to your computer and use it in GitHub Desktop.
Activate msys2 64bit on windows-latest github actions target
name: "CI"
on: ["push", "pull_request"]
jobs:
build_and_test:
name: "Run tests and build artifacts"
strategy:
matrix:
os: ["windows-latest", "ubuntu-latest", "macOS-latest"]
go: ["1.14.x"]
runs-on: ${{ matrix.os }}
steps:
- if: runner.os == 'Windows'
run: |
echo "C:\\msys64\\usr\\bin" >> $GITHUB_PATH
echo "C:\\msys64\\mingw64\\bin" >> $GITHUB_PATH
echo "PKG_CONFIG_PATH=/mingw64/lib/pkgconfig" >> $GITHUB_ENV
- ...your other steps...
@BillKek
Copy link

BillKek commented Mar 25, 2021

It's probably too old method. It get:

Error: The `add-path` command is disabled. Please upgrade to using Environment Files or opt into unsecure command execution by setting the `ACTIONS_ALLOW_UNSECURE_COMMANDS` environment variable to `true`. For more information see: https://github.blog/changelog/2020-10-01-github-actions-deprecating-set-env-and-add-path-commands/
Error: Unable to process command '::add-path::C:\\msys64\\mingw64\\bin' successfully.

@dominicletz
Copy link
Author

Yeah you're right, I've updated it now with the new syntax. But In the project where I used this before I've changed to use https://github.com/msys2/setup-msys2 now.

You can check the full source code of my current golang ci here: https://github.com/diodechain/diode_client/blob/master/.github/workflows/ci.yml

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment