Skip to content

Commit e7463ec

Browse files
committed
test out imdisk (ramdisk) for windows
1 parent 988c893 commit e7463ec

File tree

1 file changed

+24
-65
lines changed

1 file changed

+24
-65
lines changed

.github/workflows/ci.yaml

Lines changed: 24 additions & 65 deletions
Original file line numberDiff line numberDiff line change
@@ -150,76 +150,35 @@ jobs:
150150
# run: git diff --exit-code
151151

152152
lint:
153-
needs: changes
154-
if: needs.changes.outputs.offlinedocs-only == 'false' || needs.changes.outputs.ci == 'true' || github.ref == 'refs/heads/main'
155-
runs-on: ${{ github.repository_owner == 'coder' && 'depot-ubuntu-22.04-8' || 'ubuntu-latest' }}
153+
runs-on: windows-latest-16-cores
156154
steps:
157-
- name: Harden Runner
158-
uses: step-security/harden-runner@0080882f6c36860b6ba35c610c98ce87d4e2f26f # v2.10.2
159-
with:
160-
egress-policy: audit
161-
162-
- name: Checkout
163-
uses: actions/checkout@eef61447b9ff4aafe5dcd4e0bbf5d482be7e7871 # v4.2.1
164-
with:
165-
fetch-depth: 1
166-
167-
- name: Setup Node
168-
uses: ./.github/actions/setup-node
169-
170-
- name: Setup Go
171-
uses: ./.github/actions/setup-go
172-
173-
- name: Get golangci-lint cache dir
155+
- name: Checkout code
156+
uses: actions/checkout@v4
157+
158+
- name: Download and Install ImDisk
159+
shell: powershell
174160
run: |
175-
linter_ver=$(egrep -o 'GOLANGCI_LINT_VERSION=\S+' dogfood/contents/Dockerfile | cut -d '=' -f 2)
176-
go install github.com/golangci/golangci-lint/cmd/golangci-lint@v$linter_ver
177-
dir=$(golangci-lint cache status | awk '/Dir/ { print $2 }')
178-
echo "LINT_CACHE_DIR=$dir" >> $GITHUB_ENV
179-
180-
- name: golangci-lint cache
181-
uses: actions/cache@2cdf405574d6ef1f33a1d12acccd3ae82f47b3f2 # v4.1.0
182-
with:
183-
path: |
184-
${{ env.LINT_CACHE_DIR }}
185-
key: golangci-lint-${{ runner.os }}-${{ hashFiles('**/*.go') }}
186-
restore-keys: |
187-
golangci-lint-${{ runner.os }}-
188-
189-
# Check for any typos
190-
- name: Check for typos
191-
uses: crate-ci/typos@b74202f74b4346efdbce7801d187ec57b266bac8 # v1.27.3
192-
with:
193-
config: .github/workflows/typos.toml
194-
195-
- name: Fix the typos
196-
if: ${{ failure() }}
161+
$url = "https://sourceforge.net/projects/imdisk-toolkit/files/20190130/ImDiskTk.exe"
162+
Invoke-WebRequest -Uri $url -OutFile "ImDiskTk.exe"
163+
Start-Process -FilePath "ImDiskTk.exe" -ArgumentList "/fullsilent" -Wait
164+
165+
- name: Create RAM Disk
166+
shell: cmd
197167
run: |
198-
echo "::notice:: you can automatically fix typos from your CLI:
199-
cargo install typos-cli
200-
typos -c .github/workflows/typos.toml -w"
201-
202-
# Needed for helm chart linting
203-
- name: Install helm
204-
uses: azure/setup-helm@fe7b79cd5ee1e45176fcad797de68ecaf3ca4814 # v4.2.0
205-
with:
206-
version: v3.9.2
207-
208-
- name: make lint
209-
run: |
210-
make --output-sync=line -j lint
211-
212-
- name: Check workflow files
168+
imdisk -a -s 512M -m R: -p "/fs:ntfs /q /y"
169+
170+
- name: Test RAM Disk
171+
shell: cmd
213172
run: |
214-
bash <(curl https://raw.githubusercontent.com/rhysd/actionlint/main/scripts/download-actionlint.bash) 1.7.4
215-
./actionlint -color -shellcheck= -ignore "set-output"
216-
shell: bash
217-
218-
- name: Check for unstaged files
173+
dir R:
174+
echo "Testing write to RAM disk" > R:\test.txt
175+
type R:\test.txt
176+
177+
- name: Cleanup RAM Disk
178+
if: always()
179+
shell: cmd
219180
run: |
220-
rm -f ./actionlint ./typos
221-
./scripts/check_unstaged.sh
222-
shell: bash
181+
imdisk -D -m R:
223182
224183
gen:
225184
timeout-minutes: 8

0 commit comments

Comments
 (0)