Skip to content

Commit 0e5d77c

Browse files
authored
ci: install winget via Repair-WinGetPackageManager (#48)
1 parent ba6ed83 commit 0e5d77c

File tree

3 files changed

+9
-47
lines changed

3 files changed

+9
-47
lines changed

.github/workflows/build.yaml

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ on:
55
pull_request:
66
merge_group:
77
schedule: # Trigger a job on default branch at 4AM PST everyday
8-
- cron: "0 11 * * *"
8+
- cron: '0 11 * * *'
99

1010
concurrency:
1111
group: ${{ github.workflow }}-${{ github.event.compare || github.head_ref || github.ref }}
@@ -75,11 +75,8 @@ jobs:
7575
- name: Install Winget
7676
uses: ./.github/actions/install-winget
7777
with:
78-
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
79-
80-
- name: Install Winget PowerShell Module
81-
shell: pwsh
82-
run: Install-Module -Name Microsoft.WinGet.Client -Repository PSGallery -Force
78+
# windows-11-arm runner image does not include winget-cli (see https://github.com/actions/partner-runner-images/issues/95).
79+
force-cli-install: ${{ matrix.runner.name == 'windows-11-arm' && 'true' || 'false' }}
8380

8481
- name: Install LLVM ${{ matrix.llvm }}
8582
uses: ./.github/actions/install-llvm

.github/workflows/docs.yaml

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ on:
55
pull_request:
66
merge_group:
77
schedule: # Trigger a job on default branch at 4AM PST everyday
8-
- cron: "0 11 * * *"
8+
- cron: '0 11 * * *'
99

1010
concurrency:
1111
group: ${{ github.workflow }}-${{ github.event.compare || github.head_ref || github.ref }}
@@ -73,11 +73,8 @@ jobs:
7373
- name: Install Winget
7474
uses: ./.github/actions/install-winget
7575
with:
76-
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
77-
78-
- name: Install Winget PowerShell Module
79-
shell: pwsh
80-
run: Install-Module -Name Microsoft.WinGet.Client -Repository PSGallery -Force
76+
# windows-11-arm runner image does not include winget-cli (see https://github.com/actions/partner-runner-images/issues/95).
77+
force-cli-install: ${{ matrix.runner.name == 'windows-11-arm' && 'true' || 'false' }}
8178

8279
- name: Install LLVM ${{ matrix.llvm }}
8380
uses: ./.github/actions/install-llvm

.github/workflows/lint.yaml

Lines changed: 3 additions & 35 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ on:
55
pull_request:
66
merge_group:
77
schedule: # Trigger a job on default branch at 4AM PST everyday
8-
- cron: "0 11 * * *"
8+
- cron: '0 11 * * *'
99

1010
concurrency:
1111
group: ${{ github.workflow }}-${{ github.event.compare || github.head_ref || github.ref }}
@@ -71,11 +71,8 @@ jobs:
7171
- name: Install Winget
7272
uses: ./.github/actions/install-winget
7373
with:
74-
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
75-
76-
- name: Install Winget PowerShell Module
77-
shell: pwsh
78-
run: Install-Module -Name Microsoft.WinGet.Client -Repository PSGallery -Force
74+
# windows-11-arm runner image does not include winget-cli (see https://github.com/actions/partner-runner-images/issues/95).
75+
force-cli-install: ${{ matrix.runner.name == 'windows-11-arm' && 'true' || 'false' }}
7976

8077
- name: Install LLVM ${{ matrix.llvm }}
8178
uses: ./.github/actions/install-llvm
@@ -115,35 +112,6 @@ jobs:
115112
- name: Checkout Repository
116113
uses: actions/checkout@v4
117114

118-
- name: Checkout windows-drivers-rs actions
119-
uses: actions/checkout@v4
120-
with:
121-
repository: microsoft/windows-drivers-rs
122-
ref: main
123-
path: _temp/windows-drivers-rs
124-
sparse-checkout: |
125-
.github/actions
126-
sparse-checkout-cone-mode: false
127-
128-
- name: Copy actions to workspace
129-
shell: pwsh
130-
run: Copy-Item -Recurse -Force _temp/windows-drivers-rs/.github/actions .github/
131-
132-
- name: Install Winget
133-
uses: ./.github/actions/install-winget
134-
with:
135-
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
136-
137-
- name: Install Winget PowerShell Module
138-
shell: pwsh
139-
run: Install-Module -Name Microsoft.WinGet.Client -Repository PSGallery -Force
140-
141-
- name: Install WDK (${{ matrix.wdk }})
142-
uses: ./.github/actions/install-wdk
143-
with:
144-
version: ${{ matrix.wdk }}
145-
source: winget
146-
147115
- name: Install Rust Toolchain
148116
uses: dtolnay/rust-toolchain@stable
149117

0 commit comments

Comments
 (0)