mirror of
https://github.com/actions/versions-package-tools.git
synced 2025-12-11 03:56:46 +00:00
Compare commits
22 Commits
arm64-test
...
test-arm64
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
c908be285a | ||
|
|
9994541f1f | ||
|
|
9a489f7635 | ||
|
|
3e52ce162a | ||
|
|
9f957a33d1 | ||
|
|
396031ea82 | ||
|
|
ce0dee0a96 | ||
|
|
573683ef3f | ||
|
|
9f2090d94f | ||
|
|
59f5c62288 | ||
|
|
6d7d97bbfc | ||
|
|
2261c07726 | ||
|
|
f8d125bd64 | ||
|
|
43ef7a184e | ||
|
|
fd772b10e2 | ||
|
|
94f0c2f0d6 | ||
|
|
8d80095e3d | ||
|
|
e9400c9de0 | ||
|
|
45ee256400 | ||
|
|
4d855dfe21 | ||
|
|
4b176b28ee | ||
|
|
2288f67a93 |
163
.github/workflows/build-tool-packages.yml
vendored
163
.github/workflows/build-tool-packages.yml
vendored
@@ -25,50 +25,13 @@ 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: 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:
|
|
||||||
platform: [linux, darwin, win32]
|
|
||||||
architecture: [x64, arm64]
|
|
||||||
|
|
||||||
steps:
|
|
||||||
- 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
|
|
||||||
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.architecture }}]
|
|
||||||
needs: build
|
|
||||||
runs-on: ${{ matrix.os }}
|
runs-on: ${{ matrix.os }}
|
||||||
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 }}
|
||||||
excludewinarm: ${{ !(inputs.tool-name == 'node' && inputs['tool-version'] < '20.0.0' && matrix.architecture == 'arm64' && matrix.platform == 'win32') }}
|
|
||||||
RUNNER_TYPE: ${{ matrix.runner_type }}
|
|
||||||
strategy:
|
strategy:
|
||||||
fail-fast: false
|
fail-fast: false
|
||||||
matrix:
|
matrix:
|
||||||
@@ -76,23 +39,102 @@ jobs:
|
|||||||
- os: ubuntu-latest
|
- os: ubuntu-latest
|
||||||
platform: linux
|
platform: linux
|
||||||
architecture: x64
|
architecture: x64
|
||||||
- os: macos-13
|
- os: ubuntu-latest
|
||||||
platform: darwin
|
platform: darwin
|
||||||
architecture: x64
|
architecture: x64
|
||||||
- os: windows-latest
|
- os: ubuntu-latest
|
||||||
platform: win32
|
platform: win32
|
||||||
architecture: x64
|
architecture: x64
|
||||||
- os: setup-actions-ubuntu-arm64-2-core
|
- os: ubuntu-latest
|
||||||
platform: linux
|
platform: linux
|
||||||
architecture: arm64
|
architecture: arm64
|
||||||
runner_type: self-hosted
|
- os: ubuntu-latest
|
||||||
- os: macos-latest
|
|
||||||
platform: darwin
|
platform: darwin
|
||||||
architecture: arm64
|
architecture: arm64
|
||||||
- os: setup-actions-windows-arm64-4-core
|
|
||||||
|
|
||||||
|
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:
|
||||||
|
include:
|
||||||
|
- os: windows-latest
|
||||||
platform: win32
|
platform: win32
|
||||||
architecture: arm64
|
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:
|
||||||
|
name: Test ${{ inputs.tool-name }} ${{ inputs.tool-version }} [${{ matrix.platform }}] [${{ matrix.arch }}]
|
||||||
|
needs: build
|
||||||
|
runs-on: ${{ matrix.os }}
|
||||||
|
env:
|
||||||
|
ARTIFACT_NAME: ${{ inputs.tool-name }}-${{ inputs.tool-version }}-${{ matrix.platform }}-${{ matrix.arch }}
|
||||||
|
RUNNER_TYPE: ${{ matrix.runner_type }}
|
||||||
|
strategy:
|
||||||
|
fail-fast: false
|
||||||
|
matrix:
|
||||||
|
include:
|
||||||
|
- os: ubuntu-latest
|
||||||
|
platform: linux
|
||||||
|
arch: x64
|
||||||
|
- os: setup-actions-ubuntu-arm64-2-core
|
||||||
|
platform: linux
|
||||||
|
arch: arm64
|
||||||
runner_type: self-hosted
|
runner_type: self-hosted
|
||||||
|
- 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
|
||||||
|
runner_type: self-hosted
|
||||||
|
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
- name: Setup Environment on Windows ARM64 Runner
|
- name: Setup Environment on Windows ARM64 Runner
|
||||||
@@ -117,25 +159,20 @@ jobs:
|
|||||||
# Install 7-Zip
|
# Install 7-Zip
|
||||||
choco install 7zip -y
|
choco install 7zip -y
|
||||||
echo "C:\ProgramData\chocolatey\bin" | Out-File -Append -FilePath $env:GITHUB_PATH -Encoding utf8
|
echo "C:\ProgramData\chocolatey\bin" | Out-File -Append -FilePath $env:GITHUB_PATH -Encoding utf8
|
||||||
- name: checkout
|
|
||||||
if: env.excludewinarm == 'true'
|
- uses: actions/checkout@v3
|
||||||
uses: actions/checkout@v4
|
|
||||||
with:
|
with:
|
||||||
submodules: true
|
submodules: true
|
||||||
|
|
||||||
- name: Fully cleanup the toolcache directory before testing
|
- name: Fully cleanup the toolcache directory before testing
|
||||||
if: env.excludewinarm == 'true'
|
|
||||||
run: ./helpers/clean-toolcache.ps1 -ToolName "${{ inputs.tool-name }}"
|
run: ./helpers/clean-toolcache.ps1 -ToolName "${{ inputs.tool-name }}"
|
||||||
|
|
||||||
- name: Download artifact
|
- name: Download artifact
|
||||||
if: env.excludewinarm == 'true'
|
uses: actions/download-artifact@v3
|
||||||
uses: actions/download-artifact@v4
|
|
||||||
with:
|
with:
|
||||||
name: ${{ env.ARTIFACT_NAME }}
|
path: ${{ runner.temp }}
|
||||||
path: ${{ runner.temp }}/${{ env.ARTIFACT_NAME }}
|
|
||||||
|
|
||||||
- name: Extract files
|
- name: Extract files
|
||||||
if: env.excludewinarm == 'true'
|
|
||||||
run: |
|
run: |
|
||||||
if ('${{ matrix.platform }}' -eq 'win32') {
|
if ('${{ matrix.platform }}' -eq 'win32') {
|
||||||
if ('${{ inputs.tool-name }}' -eq 'node') {
|
if ('${{ inputs.tool-name }}' -eq 'node') {
|
||||||
@@ -155,28 +192,23 @@ jobs:
|
|||||||
working-directory: ${{ runner.temp }}/${{ env.ARTIFACT_NAME }}
|
working-directory: ${{ runner.temp }}/${{ env.ARTIFACT_NAME }}
|
||||||
|
|
||||||
- name: Apply build artifact to the local machine
|
- name: Apply build artifact to the local machine
|
||||||
if: env.excludewinarm == 'true'
|
|
||||||
run: |
|
run: |
|
||||||
if ('${{ matrix.platform }}' -eq 'win32') { powershell ./setup.ps1 }
|
if ('${{ matrix.platform }}' -eq 'win32') { powershell ./setup.ps1 } else { sh ./setup.sh }
|
||||||
else {
|
|
||||||
sh ./setup.sh
|
|
||||||
}
|
|
||||||
working-directory: ${{ runner.temp }}/${{ env.ARTIFACT_NAME }}
|
working-directory: ${{ runner.temp }}/${{ env.ARTIFACT_NAME }}
|
||||||
|
|
||||||
- name: Setup Node.js ${{ inputs.tool-version }}
|
- name: Setup Node.js ${{ inputs.tool-version }}
|
||||||
if: env.excludewinarm == 'true' && inputs.tool-name == 'node'
|
if: inputs.tool-name == 'node'
|
||||||
uses: actions/setup-node@v4
|
uses: actions/setup-node@v3
|
||||||
with:
|
with:
|
||||||
node-version: ${{ inputs.tool-version }}
|
node-version: ${{ inputs.tool-version }}
|
||||||
|
|
||||||
- name: Setup Go ${{ inputs.tool-version }}
|
- name: Setup Go ${{ inputs.tool-version }}
|
||||||
if: inputs.tool-name == 'go'
|
if: inputs.tool-name == 'go'
|
||||||
uses: actions/setup-go@v5
|
uses: actions/setup-go@v3
|
||||||
with:
|
with:
|
||||||
go-version: ${{ inputs.tool-version }}
|
go-version: ${{ inputs.tool-version }}
|
||||||
|
|
||||||
- name: Wait for the logs
|
- name: Wait for the logs
|
||||||
if: env.excludewinarm == 'true'
|
|
||||||
run: |
|
run: |
|
||||||
Write-Host "Fake step that does nothing"
|
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."
|
Write-Host "We need it because log from the previous step 'Setup ${{ inputs.tool-name }}' is not available here yet."
|
||||||
@@ -185,7 +217,6 @@ jobs:
|
|||||||
for ($i = 0; $i -lt 200; $i++) { Get-Random }
|
for ($i = 0; $i -lt 200; $i++) { Get-Random }
|
||||||
|
|
||||||
- name: Run tests
|
- name: Run tests
|
||||||
if: env.excludewinarm == 'true'
|
|
||||||
env:
|
env:
|
||||||
VERSION: ${{ inputs.tool-version }}
|
VERSION: ${{ inputs.tool-version }}
|
||||||
run: |
|
run: |
|
||||||
@@ -201,7 +232,7 @@ jobs:
|
|||||||
needs: test
|
needs: test
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/download-artifact@v4
|
- uses: actions/download-artifact@v3
|
||||||
|
|
||||||
- name: Generate release body
|
- name: Generate release body
|
||||||
id: generate-release-body
|
id: generate-release-body
|
||||||
@@ -237,7 +268,7 @@ jobs:
|
|||||||
}
|
}
|
||||||
|
|
||||||
- name: Upload release assets
|
- name: Upload release assets
|
||||||
uses: actions/github-script@v7
|
uses: actions/github-script@v6
|
||||||
with:
|
with:
|
||||||
github-token: ${{ secrets.GITHUB_TOKEN }}
|
github-token: ${{ secrets.GITHUB_TOKEN }}
|
||||||
script: |
|
script: |
|
||||||
@@ -261,7 +292,7 @@ jobs:
|
|||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
- name: Trigger "Create Pull Request" workflow
|
- name: Trigger "Create Pull Request" workflow
|
||||||
uses: actions/github-script@v7
|
uses: actions/github-script@v6
|
||||||
with:
|
with:
|
||||||
github-token: ${{ secrets.GITHUB_TOKEN }}
|
github-token: ${{ secrets.GITHUB_TOKEN }}
|
||||||
script: |
|
script: |
|
||||||
|
|||||||
Reference in New Issue
Block a user