Skip to content

Commit

Permalink
feat: support windows 2025 runners (#12)
Browse files Browse the repository at this point in the history
  • Loading branch information
samypr100 authored Jan 5, 2025
1 parent 85cec5f commit c13db53
Show file tree
Hide file tree
Showing 4 changed files with 52 additions and 16 deletions.
53 changes: 42 additions & 11 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,15 @@ jobs:
run: npm run fmt-check
- name: Run lint check
run: npm run lint
- name: Run bundle
run: npm run bundle
- name: Compare the expected and actual dist/ directories
run: |
if [ "$(git diff --ignore-space-at-eol dist/ | wc -l)" -gt "0" ]; then
echo "Detected uncommitted changes after build. See status below:"
git diff --text -v
exit 1
fi
audit:
runs-on: ubuntu-latest
Expand All @@ -42,15 +51,23 @@ jobs:
- run: npm audit --audit-level moderate --omit dev

test-defaults:
runs-on: windows-2022
strategy:
fail-fast: false
matrix:
runner: [ windows-2022, windows-2025 ]
runs-on: ${{ matrix.runner }}
steps:
- name: Check out source code
uses: actions/checkout@v4
- name: Setup Dev Drive
uses: ./

test-declare-inputs:
runs-on: windows-2022
strategy:
fail-fast: false
matrix:
runner: [ windows-2022, windows-2025 ]
runs-on: ${{ matrix.runner }}
steps:
- name: Check out source code
uses: actions/checkout@v4
Expand All @@ -71,9 +88,10 @@ jobs:
strategy:
fail-fast: false
matrix:
runner: [ windows-2022, windows-2025 ]
drive-format: [ FAT, FAT32, exFAT, NTFS, ReFS ]
with-mount-path: [ true, false ]
runs-on: windows-2022
runs-on: ${{ matrix.runner }}
steps:
- name: Check out source code
uses: actions/checkout@v4
Expand All @@ -83,14 +101,17 @@ jobs:
drive-format: ${{ matrix.drive-format }}
# This should fall back to Drive Letter on unsupported drive formats.
mount-path: ${{ matrix.with-mount-path && 'mount' || '' }}
# Ensure we test FS directly
native-dev-drive: false

test-large-size:
strategy:
fail-fast: false
matrix:
runner: [ windows-2022, windows-2025 ]
drive-type: [ Fixed, Dynamic ]
with-mount-path: [ true, false ]
runs-on: windows-2022
runs-on: ${{ matrix.runner }}
steps:
- name: Check out source code
uses: actions/checkout@v4
Expand All @@ -106,8 +127,9 @@ jobs:
strategy:
fail-fast: false
matrix:
runner: [ windows-2022, windows-2025 ]
with-mount-path: [ true, false ]
runs-on: windows-2022
runs-on: ${{ matrix.runner }}
steps:
- name: Check out source code
uses: actions/checkout@v4
Expand All @@ -126,9 +148,10 @@ jobs:
strategy:
fail-fast: false
matrix:
runner: [ windows-2022, windows-2025 ]
is-relative: [ true, false ]
drive-format: [ ReFS, NTFS ]
runs-on: windows-2022
runs-on: ${{ matrix.runner }}
steps:
- name: Check out source code
uses: actions/checkout@v4
Expand All @@ -146,9 +169,10 @@ jobs:
strategy:
fail-fast: false
matrix:
runner: [ windows-2022, windows-2025 ]
with-mount-path: [ true, false ]
workspace-copy: [ true ]
runs-on: windows-2022
runs-on: ${{ matrix.runner }}
steps:
- name: Check out source code
uses: actions/checkout@v4
Expand All @@ -173,9 +197,10 @@ jobs:
strategy:
fail-fast: false
matrix:
runner: [ windows-2022, windows-2025 ]
with-mount-path: [ true, false ]
workspace-copy: [ true, false ]
runs-on: windows-2022
runs-on: ${{ matrix.runner }}
steps:
- name: Check out source code
uses: actions/checkout@v4
Expand Down Expand Up @@ -248,8 +273,9 @@ jobs:
strategy:
fail-fast: false
matrix:
runner: [ windows-2022, windows-2025 ]
with-mount-path: [ true, false ]
runs-on: windows-2022
runs-on: ${{ matrix.runner }}
steps:
- name: Check out source code
uses: actions/checkout@v4
Expand Down Expand Up @@ -279,8 +305,9 @@ jobs:
strategy:
fail-fast: false
matrix:
runner: [ windows-2022, windows-2025 ]
with-mount-path: [ true, false ]
runs-on: windows-2022
runs-on: ${{ matrix.runner }}
needs: [test-cache-storage]
steps:
- name: Check out source code
Expand All @@ -306,7 +333,11 @@ jobs:
}
test-env-mapping:
runs-on: windows-2022
strategy:
fail-fast: false
matrix:
runner: [ windows-2022, windows-2025 ]
runs-on: ${{ matrix.runner }}
steps:
- name: Check out source code
uses: actions/checkout@v4
Expand Down
5 changes: 5 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
# 3.3.0

* Add `windows-2025` runner support.
* Change default VHDX size to 2GB.

# 3.2.0

* Add `env-mapping` option to support improved environment variables configuration.
Expand Down
8 changes: 4 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -39,8 +39,8 @@ You can optionally pass parameters to the action as follows:
```yaml
- uses: samypr100/setup-dev-drive@v3
with:
# Drive size in bytes (or as a PowerShell numeric literal). Defaults to 1GB.
drive-size: 1GB
# Drive size in bytes (or as a PowerShell numeric literal). Defaults to 2GB.
drive-size: 2GB
# Drive file system (ReFS, NTFS, etc.). Defaults to ReFS.
drive-format: ReFS
# Drive allocation (Dynamic or Fixed). Defaults to Dynamic.
Expand Down Expand Up @@ -68,15 +68,15 @@ For more examples, take a look in the dedicated [examples section](#examples).

### *drive-size*

By default, this option is set to `1GB`.
By default, this option is set to `2GB`.

Allows you to configure the dev drive size in bytes. This is subject to the limit of space
available on your runner. The default public runners roughly hold about 15GB of
[space](https://docs.github.com/en/actions/using-github-hosted-runners/about-github-hosted-runners/about-github-hosted-runners#standard-github-hosted-runners-for-public-repositories),
so it's suggested you keep your drive size below that limit, or you may encounter errors.

You can use PowerShell built in [Numeric Literals](https://learn.microsoft.com/en-us/powershell/module/microsoft.powershell.core/about/about_numeric_literals)
functionality to automatically expand expressions like `1GB` to mean `1073741824`.
functionality to automatically expand expressions like `2GB` to mean `2147483648`.

### *drive-format*

Expand Down
2 changes: 1 addition & 1 deletion action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ branding:
inputs:
drive-size:
description: "Drive Size. Examples: 1GB, 3GB, 10GB."
default: "1GB"
default: "2GB"
drive-format:
description: "Drive Format. Examples: FAT, FAT32, exFAT, NTFS, ReFS."
default: "ReFS"
Expand Down

0 comments on commit c13db53

Please sign in to comment.