Skip to content
Merged
Show file tree
Hide file tree
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
35 changes: 35 additions & 0 deletions .github/util/initialize/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,20 +17,55 @@ runs:
with:
node-version: "${{ inputs.node-version }}"

# See: https://github.com/dart-lang/sdk/issues/52266
- run: Invoke-WebRequest https://pub.dev
if: runner.os == 'Windows'
shell: powershell

# See: https://github.com/orgs/community/discussions/131594
# The composite action requires an explict shell, but bash is not available on windows-arm64 runner.
# For the following commands conditionally use bash or powershell based on the runner.os:
- run: dart pub get
if: runner.os != 'Windows'
shell: bash

- run: dart pub get
if: runner.os == 'Windows'
shell: powershell

- run: npm install
if: runner.os != 'Windows'
shell: bash

- run: npm install
if: runner.os == 'Windows'
shell: powershell

- uses: bufbuild/[email protected]
with: {github_token: "${{ inputs.github-token }}"}

# This composite action requires bash, but bash is not available on windows-arm64 runner.
# Avoid running this composite action on non-PR, so that we can release on windows-arm64.
- name: Check out the language repo
if: github.event_name == 'pull_request'
uses: sass/clone-linked-repo@v1
with: {repo: sass/sass, path: build/language}

# Git is not pre-installed on windows-arm64 runner, however actions/checkout support
# downloading repo via GitHub API.
- name: Check out the language repo
if: github.event_name != 'pull_request'
uses: actions/checkout@v4
with: {repository: sass/sass, path: build/language}

- name: Generate Dart from protobuf
if: runner.os != 'Windows'
run: dart run grinder protobuf
env: {UPDATE_SASS_SASS_REPO: false}
shell: bash

- name: Generate Dart from protobuf
if: runner.os == 'Windows'
run: dart run grinder protobuf
env: {UPDATE_SASS_SASS_REPO: false}
shell: powershell
22 changes: 3 additions & 19 deletions .github/workflows/build-windows.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,29 +19,13 @@ jobs:
- arch: ia32
runner: windows-latest
- arch: arm64
# This should be windows-arm64, but it's broken by several issues:
# https://github.com/orgs/community/discussions/131594
# https://github.com/orgs/community/discussions/131754
runner: windows-latest
runner: windows-arm64

steps:
- uses: actions/checkout@v4

# See: https://github.com/orgs/community/discussions/131594
# The composite action requires bash which is not available on windows-arm64 runner.
# - uses: ./.github/util/initialize
# with: {github-token: "${{ github.token }}"}

- uses: dart-lang/setup-dart@v1

- uses: bufbuild/[email protected]
with: {github_token: "${{ github.token }}"}

- name: Install Dependencies
run: dart pub get --verbose

- name: Compile Protobuf
run: dart run grinder protobuf
- uses: ./.github/util/initialize
with: {github-token: "${{ github.token }}"}

- name: Build
run: dart run grinder pkg-standalone-windows-${{ matrix.arch }}
Expand Down
Loading