Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

CI: Fix install scoop on Windows #722

Closed
wants to merge 1 commit into from
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -70,9 +70,10 @@ jobs:
python -m pip install scons

- name: Windows GCC dependency
if: ${{ matrix.platform == 'windows' }}
if: ${{ matrix.platform == 'windows' && matrix.flags == 'use_mingw=yes' }}
# Install GCC from Scoop as the default supplied GCC doesn't work ("Error 1").
run: |
Set-ExecutionPolicy RemoteSigned -scope CurrentUser
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That's used to allow unsigned script execution, not to set current user. It won't help here.

Something like this might work:

Invoke-Command -ScriptBlock ([ScriptBlock]::Create((New-Object System.Net.WebClient).DownloadString('https://get.scoop.sh'))) -ArgumentList RunAsAdmin

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I really don't like PowerShell syntax so I went for a more radical approach :P #723

That action seems to use Chocolatey behind the scenes so it's pretty similar in the end, but looks a tiny bit cleaner on our side.

Invoke-Expression (New-Object System.Net.WebClient).DownloadString('https://get.scoop.sh')
scoop install gcc
g++ --version
Expand Down