mirror of
https://github.com/actions/versions-package-tools.git
synced 2025-12-10 19:50:24 +00:00
Fix for windows arm64 node js package (7z) file (#75)
* Update build-tool-packages.yml * Update and rename build-tool-packages.yml to build-tool-packages.ymll * Rename build-tool-packages.ymll to build-tool-packages.yml
This commit is contained in:
59
.github/workflows/build-tool-packages.yml
vendored
59
.github/workflows/build-tool-packages.yml
vendored
@@ -1,3 +1,4 @@
|
|||||||
|
|
||||||
# This reusable workflow is used by actions/*-versions repositories
|
# This reusable workflow is used by actions/*-versions repositories
|
||||||
# It is designed to
|
# It is designed to
|
||||||
# - build and test new versions of a tool (Go, Node)
|
# - build and test new versions of a tool (Go, Node)
|
||||||
@@ -25,34 +26,19 @@ defaults:
|
|||||||
run:
|
run:
|
||||||
shell: pwsh
|
shell: pwsh
|
||||||
|
|
||||||
# Fix for windows arm64 7z file issue. More details at https://github.com/nodejs/node/issues/52231
|
|
||||||
jobs:
|
jobs:
|
||||||
build:
|
build:
|
||||||
name: Build ${{ inputs.tool-name }} ${{ inputs.tool-version }} [${{ matrix.platform }}] [${{ matrix.architecture }}]
|
name: Build ${{ inputs.tool-name }} ${{ inputs.tool-version }} [${{ matrix.platform }}] [${{ matrix.architecture }}]
|
||||||
runs-on: ${{ matrix.os }}
|
runs-on: ubuntu-latest
|
||||||
env:
|
env:
|
||||||
ARTIFACT_NAME: ${{ inputs.tool-name }}-${{ inputs.tool-version }}-${{ matrix.platform }}-${{ matrix.architecture }}
|
ARTIFACT_NAME: ${{ inputs.tool-name }}-${{ inputs.tool-version }}-${{ matrix.platform }}-${{ matrix.architecture }}
|
||||||
strategy:
|
strategy:
|
||||||
fail-fast: false
|
fail-fast: false
|
||||||
matrix:
|
matrix:
|
||||||
include:
|
platform: [linux, darwin, win32]
|
||||||
- os: ubuntu-latest
|
architecture: [x64, arm64]
|
||||||
platform: linux
|
|
||||||
architecture: x64
|
|
||||||
- os: ubuntu-latest
|
|
||||||
platform: darwin
|
|
||||||
architecture: x64
|
|
||||||
- os: ubuntu-latest
|
|
||||||
platform: win32
|
|
||||||
architecture: x64
|
|
||||||
- os: ubuntu-latest
|
|
||||||
platform: linux
|
|
||||||
architecture: arm64
|
|
||||||
- os: ubuntu-latest
|
|
||||||
platform: darwin
|
|
||||||
architecture: arm64
|
|
||||||
|
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v4
|
- uses: actions/checkout@v4
|
||||||
with:
|
with:
|
||||||
@@ -70,39 +56,6 @@ jobs:
|
|||||||
name: ${{ env.ARTIFACT_NAME }}
|
name: ${{ env.ARTIFACT_NAME }}
|
||||||
path: ${{ runner.temp }}/artifact
|
path: ${{ runner.temp }}/artifact
|
||||||
|
|
||||||
build-arm:
|
|
||||||
name: Build ${{ inputs.tool-name }} ${{ inputs.tool-version }} [${{ matrix.platform }}] [${{ matrix.architecture }}]
|
|
||||||
runs-on: windows-latest
|
|
||||||
if: (inputs.tool-name == 'go') || (inputs.tool-name == 'node' && inputs['tool-version'] > '20.0.0')
|
|
||||||
env:
|
|
||||||
ARTIFACT_NAME: ${{ inputs.tool-name }}-${{ inputs.tool-version }}-${{ matrix.platform }}-${{ matrix.architecture }}
|
|
||||||
strategy:
|
|
||||||
fail-fast: false
|
|
||||||
matrix:
|
|
||||||
include:
|
|
||||||
- os: windows-latest
|
|
||||||
platform: win32
|
|
||||||
architecture: arm64
|
|
||||||
|
|
||||||
|
|
||||||
steps:
|
|
||||||
- uses: actions/checkout@v4
|
|
||||||
with:
|
|
||||||
submodules: true
|
|
||||||
|
|
||||||
- name: Build ${{ inputs.tool-name }} ${{ inputs.tool-version }}
|
|
||||||
run: |
|
|
||||||
./builders/build-${{ inputs.tool-name }}.ps1 -Version ${{ inputs.tool-version }} `
|
|
||||||
-Platform ${{ matrix.platform }} `
|
|
||||||
-Architecture ${{ matrix.architecture }}
|
|
||||||
|
|
||||||
|
|
||||||
- name: Publish artifact
|
|
||||||
uses: actions/upload-artifact@v3
|
|
||||||
with:
|
|
||||||
name: ${{ env.ARTIFACT_NAME }}
|
|
||||||
path: ${{ runner.temp }}/artifact
|
|
||||||
|
|
||||||
test:
|
test:
|
||||||
name: Test ${{ inputs.tool-name }} ${{ inputs.tool-version }} [${{ matrix.platform }}]
|
name: Test ${{ inputs.tool-name }} ${{ inputs.tool-version }} [${{ matrix.platform }}]
|
||||||
needs: build
|
needs: build
|
||||||
@@ -184,7 +137,7 @@ jobs:
|
|||||||
env:
|
env:
|
||||||
VERSION: ${{ inputs.tool-version }}
|
VERSION: ${{ inputs.tool-version }}
|
||||||
run: |
|
run: |
|
||||||
Install-Module Pester -Force -Scope CurrentUser
|
Install-Module Pester -Force -Scope CurrentUser -SkipPublisherCheck
|
||||||
Import-Module Pester
|
Import-Module Pester
|
||||||
$toolName = (Get-Culture).TextInfo.ToTitleCase("${{ inputs.tool-name }}")
|
$toolName = (Get-Culture).TextInfo.ToTitleCase("${{ inputs.tool-name }}")
|
||||||
Invoke-Pester -Script ./$toolName.Tests.ps1 -EnableExit
|
Invoke-Pester -Script ./$toolName.Tests.ps1 -EnableExit
|
||||||
|
|||||||
Reference in New Issue
Block a user