Update build-tool-packages.yml

test-arm64
gowridurgad 7 months ago committed by GitHub
parent 43ef7a184e
commit f8d125bd64
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

@ -1,4 +1,3 @@
# This reusable workflow is used by actions/*-versions repositories
# It is designed to
# - build and test new versions of a tool (Go, Node)
@ -26,18 +25,65 @@ defaults:
run:
shell: pwsh
# Fix for windows arm64 7z file issue. More details at https://github.com/nodejs/node/issues/52231
jobs:
build:
name: Build ${{ inputs.tool-name }} ${{ inputs.tool-version }} [${{ matrix.platform }}] [${{ matrix.architecture }}]
runs-on: ubuntu-latest
runs-on: ${{ matrix.os }}
env:
ARTIFACT_NAME: ${{ inputs.tool-name }}-${{ inputs.tool-version }}-${{ matrix.platform }}-${{ matrix.architecture }}
strategy:
fail-fast: false
matrix:
include:
- os: ubuntu-latest
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:
- 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
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:
platform: [linux, darwin, win32]
architecture: [x64, arm64]
include:
- os: windows-latest
platform: win32
architecture: arm64
steps:
- uses: actions/checkout@v4
@ -50,6 +96,7 @@ jobs:
-Platform ${{ matrix.platform }} `
-Architecture ${{ matrix.architecture }}
- name: Publish artifact
uses: actions/upload-artifact@v3
with:
@ -69,46 +116,24 @@ jobs:
- os: ubuntu-latest
platform: linux
arch: x64
- os: macos-latest
platform: darwin
arch: arm64
- os: windows-latest
platform: win32
arch: x64
- os: setup-actions-ubuntu-arm64-2-core
platform: linux
arch: arm64
- os: macos-13
platform: darwin
arch: x64
- os: macos-latest
platform: darwin
arch: arm64
- os: windows-latest
platform: win32
arch: x64
- os: setup-actions-windows-arm64-4-core
platform: win32
arch: arm64
steps:
- name: Setup Environment on Windows ARM64 Runner
if: matrix.os == 'setup-actions-windows-arm64-4-core'
shell: powershell
run: |
# Install Chocolatey
Set-ExecutionPolicy Bypass -Scope Process -Force
[System.Net.ServicePointManager]::SecurityProtocol = [System.Net.ServicePointManager]::SecurityProtocol -bor 3072
iex ((New-Object System.Net.WebClient).DownloadString('https://chocolatey.org/install.ps1'))
echo "C:\ProgramData\Chocolatey\bin" | Out-File -Append -FilePath $env:GITHUB_PATH -Encoding utf8
# Install PowerShell
choco install powershell-core -y
echo "C:\Program Files\PowerShell\7" | Out-File -Append -FilePath $env:GITHUB_PATH -Encoding utf8
# Install Git
choco install git -y
echo "C:\Program Files\Git\cmd" | Out-File -Append -FilePath $env:GITHUB_PATH -Encoding utf8
# Install 7-Zip
choco install 7zip -y
echo "C:\ProgramData\chocolatey\bin" | Out-File -Append -FilePath $env:GITHUB_PATH -Encoding utf8
steps:
- uses: actions/checkout@v3
with:
submodules: true
@ -169,6 +194,7 @@ jobs:
env:
VERSION: ${{ inputs.tool-version }}
run: |
Install-Module Pester -Force -Scope CurrentUser
Import-Module Pester
$toolName = (Get-Culture).TextInfo.ToTitleCase("${{ inputs.tool-name }}")
Invoke-Pester -Script ./$toolName.Tests.ps1 -EnableExit

Loading…
Cancel
Save