mirror of
https://github.com/actions/versions-package-tools.git
synced 2025-12-10 19:50:24 +00:00
Compare commits
6 Commits
test-arm64
...
arm64-test
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
1a0cb4bf74 | ||
|
|
d33dc40357 | ||
|
|
94d413c5d2 | ||
|
|
4b4e16b9dd | ||
|
|
fcb2d9a895 | ||
|
|
5e3e49f869 |
127
.github/workflows/build-tool-packages.yml
vendored
127
.github/workflows/build-tool-packages.yml
vendored
@@ -25,90 +25,49 @@ 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: ${{ matrix.os }}
|
||||
runs-on: ubuntu-latest
|
||||
env:
|
||||
ARTIFACT_NAME: ${{ inputs.tool-name }}-${{ inputs.tool-version }}-${{ matrix.platform }}-${{ matrix.architecture }}
|
||||
excludewinarm: ${{ !(inputs.tool-name == 'node' && inputs['tool-version'] < '20.0.0' && matrix.architecture == 'arm64' && matrix.platform == 'win32') }}
|
||||
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
|
||||
platform: [linux, darwin, win32]
|
||||
architecture: [x64, arm64]
|
||||
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
- name: checkout
|
||||
if: env.excludewinarm == 'true'
|
||||
uses: actions/checkout@v4
|
||||
with:
|
||||
submodules: true
|
||||
|
||||
- name: Build ${{ inputs.tool-name }} ${{ inputs.tool-version }}
|
||||
if: env.excludewinarm == 'true'
|
||||
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:
|
||||
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
|
||||
if: env.excludewinarm == 'true'
|
||||
uses: actions/upload-artifact@v4
|
||||
with:
|
||||
name: ${{ env.ARTIFACT_NAME }}
|
||||
path: ${{ runner.temp }}/artifact
|
||||
|
||||
test:
|
||||
name: Test ${{ inputs.tool-name }} ${{ inputs.tool-version }} [${{ matrix.platform }}] [${{ matrix.arch }}]
|
||||
name: Test ${{ inputs.tool-name }} ${{ inputs.tool-version }} [${{ matrix.platform }}] [${{ matrix.architecture }}]
|
||||
needs: build
|
||||
runs-on: ${{ matrix.os }}
|
||||
env:
|
||||
ARTIFACT_NAME: ${{ inputs.tool-name }}-${{ inputs.tool-version }}-${{ matrix.platform }}-${{ matrix.arch }}
|
||||
ARTIFACT_NAME: ${{ inputs.tool-name }}-${{ inputs.tool-version }}-${{ matrix.platform }}-${{ matrix.architecture }}
|
||||
excludewinarm: ${{ !(inputs.tool-name == 'node' && inputs['tool-version'] < '20.0.0' && matrix.architecture == 'arm64' && matrix.platform == 'win32') }}
|
||||
RUNNER_TYPE: ${{ matrix.runner_type }}
|
||||
strategy:
|
||||
fail-fast: false
|
||||
@@ -116,25 +75,24 @@ jobs:
|
||||
include:
|
||||
- os: ubuntu-latest
|
||||
platform: linux
|
||||
arch: x64
|
||||
- os: setup-actions-ubuntu-arm64-2-core
|
||||
platform: linux
|
||||
arch: arm64
|
||||
runner_type: self-hosted
|
||||
architecture: x64
|
||||
- os: macos-13
|
||||
platform: darwin
|
||||
arch: x64
|
||||
- os: macos-latest
|
||||
platform: darwin
|
||||
arch: arm64
|
||||
architecture: x64
|
||||
- os: windows-latest
|
||||
platform: win32
|
||||
arch: x64
|
||||
architecture: x64
|
||||
- os: setup-actions-ubuntu-arm64-2-core
|
||||
platform: linux
|
||||
architecture: arm64
|
||||
runner_type: self-hosted
|
||||
- os: macos-latest
|
||||
platform: darwin
|
||||
architecture: arm64
|
||||
- os: setup-actions-windows-arm64-4-core
|
||||
platform: win32
|
||||
arch: arm64
|
||||
architecture: arm64
|
||||
runner_type: self-hosted
|
||||
|
||||
|
||||
steps:
|
||||
- name: Setup Environment on Windows ARM64 Runner
|
||||
@@ -159,20 +117,25 @@ jobs:
|
||||
# Install 7-Zip
|
||||
choco install 7zip -y
|
||||
echo "C:\ProgramData\chocolatey\bin" | Out-File -Append -FilePath $env:GITHUB_PATH -Encoding utf8
|
||||
|
||||
- uses: actions/checkout@v3
|
||||
- name: checkout
|
||||
if: env.excludewinarm == 'true'
|
||||
uses: actions/checkout@v4
|
||||
with:
|
||||
submodules: true
|
||||
|
||||
- name: Fully cleanup the toolcache directory before testing
|
||||
if: env.excludewinarm == 'true'
|
||||
run: ./helpers/clean-toolcache.ps1 -ToolName "${{ inputs.tool-name }}"
|
||||
|
||||
- name: Download artifact
|
||||
uses: actions/download-artifact@v3
|
||||
if: env.excludewinarm == 'true'
|
||||
uses: actions/download-artifact@v4
|
||||
with:
|
||||
path: ${{ runner.temp }}
|
||||
name: ${{ env.ARTIFACT_NAME }}
|
||||
path: ${{ runner.temp }}/${{ env.ARTIFACT_NAME }}
|
||||
|
||||
- name: Extract files
|
||||
if: env.excludewinarm == 'true'
|
||||
run: |
|
||||
if ('${{ matrix.platform }}' -eq 'win32') {
|
||||
if ('${{ inputs.tool-name }}' -eq 'node') {
|
||||
@@ -192,23 +155,28 @@ jobs:
|
||||
working-directory: ${{ runner.temp }}/${{ env.ARTIFACT_NAME }}
|
||||
|
||||
- name: Apply build artifact to the local machine
|
||||
if: env.excludewinarm == 'true'
|
||||
run: |
|
||||
if ('${{ matrix.platform }}' -eq 'win32') { powershell ./setup.ps1 } else { sh ./setup.sh }
|
||||
if ('${{ matrix.platform }}' -eq 'win32') { powershell ./setup.ps1 }
|
||||
else {
|
||||
sh ./setup.sh
|
||||
}
|
||||
working-directory: ${{ runner.temp }}/${{ env.ARTIFACT_NAME }}
|
||||
|
||||
- name: Setup Node.js ${{ inputs.tool-version }}
|
||||
if: inputs.tool-name == 'node'
|
||||
uses: actions/setup-node@v3
|
||||
if: env.excludewinarm == 'true' && inputs.tool-name == 'node'
|
||||
uses: actions/setup-node@v4
|
||||
with:
|
||||
node-version: ${{ inputs.tool-version }}
|
||||
|
||||
- name: Setup Go ${{ inputs.tool-version }}
|
||||
if: inputs.tool-name == 'go'
|
||||
uses: actions/setup-go@v3
|
||||
uses: actions/setup-go@v5
|
||||
with:
|
||||
go-version: ${{ inputs.tool-version }}
|
||||
|
||||
- name: Wait for the logs
|
||||
if: env.excludewinarm == 'true'
|
||||
run: |
|
||||
Write-Host "Fake step that does nothing"
|
||||
Write-Host "We need it because log from the previous step 'Setup ${{ inputs.tool-name }}' is not available here yet."
|
||||
@@ -217,6 +185,7 @@ jobs:
|
||||
for ($i = 0; $i -lt 200; $i++) { Get-Random }
|
||||
|
||||
- name: Run tests
|
||||
if: env.excludewinarm == 'true'
|
||||
env:
|
||||
VERSION: ${{ inputs.tool-version }}
|
||||
run: |
|
||||
@@ -232,7 +201,7 @@ jobs:
|
||||
needs: test
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/download-artifact@v3
|
||||
- uses: actions/download-artifact@v4
|
||||
|
||||
- name: Generate release body
|
||||
id: generate-release-body
|
||||
@@ -268,7 +237,7 @@ jobs:
|
||||
}
|
||||
|
||||
- name: Upload release assets
|
||||
uses: actions/github-script@v6
|
||||
uses: actions/github-script@v7
|
||||
with:
|
||||
github-token: ${{ secrets.GITHUB_TOKEN }}
|
||||
script: |
|
||||
@@ -292,7 +261,7 @@ jobs:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Trigger "Create Pull Request" workflow
|
||||
uses: actions/github-script@v6
|
||||
uses: actions/github-script@v7
|
||||
with:
|
||||
github-token: ${{ secrets.GITHUB_TOKEN }}
|
||||
script: |
|
||||
|
||||
Reference in New Issue
Block a user