fix: allow for aarch64 build (#960)

This commit is contained in:
Tom Hu
2023-04-20 10:02:22 -07:00
committed by GitHub
parent 6757614f24
commit f539f977d5
5 changed files with 22 additions and 8 deletions

View File

@@ -63,7 +63,7 @@ inputs:
description: 'Specify a prefix on files listed in the network section of the Codecov report. Useful to help resolve path fixing' description: 'Specify a prefix on files listed in the network section of the Codecov report. Useful to help resolve path fixing'
required: false required: false
os: os:
description: 'Override the assumed OS. Options are alpine | linux | macos | windows.' description: 'Override the assumed OS. Options are aarch64 | alpine | linux | macos | windows.'
required: false required: false
override_branch: override_branch:
description: 'Specify the branch name' description: 'Specify the branch name'

12
dist/index.js vendored

File diff suppressed because one or more lines are too long

2
dist/index.js.map vendored

File diff suppressed because one or more lines are too long

View File

@@ -39,6 +39,7 @@ test('getBaseUrl', () => {
expect(PLATFORMS.map((platform) => { expect(PLATFORMS.map((platform) => {
return getBaseUrl(platform, 'latest'); return getBaseUrl(platform, 'latest');
})).toEqual([ })).toEqual([
'https://uploader.codecov.io/latest/aarch64/codecov',
'https://uploader.codecov.io/latest/alpine/codecov', 'https://uploader.codecov.io/latest/alpine/codecov',
'https://uploader.codecov.io/latest/linux/codecov', 'https://uploader.codecov.io/latest/linux/codecov',
'https://uploader.codecov.io/latest/macos/codecov', 'https://uploader.codecov.io/latest/macos/codecov',
@@ -48,6 +49,7 @@ test('getBaseUrl', () => {
expect(PLATFORMS.map((platform) => { expect(PLATFORMS.map((platform) => {
return getBaseUrl(platform, 'v0.1.0_8880'); return getBaseUrl(platform, 'v0.1.0_8880');
})).toEqual([ })).toEqual([
'https://uploader.codecov.io/v0.1.0_8880/aarch64/codecov',
'https://uploader.codecov.io/v0.1.0_8880/alpine/codecov', 'https://uploader.codecov.io/v0.1.0_8880/alpine/codecov',
'https://uploader.codecov.io/v0.1.0_8880/linux/codecov', 'https://uploader.codecov.io/v0.1.0_8880/linux/codecov',
'https://uploader.codecov.io/v0.1.0_8880/macos/codecov', 'https://uploader.codecov.io/v0.1.0_8880/macos/codecov',
@@ -58,13 +60,13 @@ test('getBaseUrl', () => {
test('isWindows', () => { test('isWindows', () => {
expect(PLATFORMS.map((platform) => { expect(PLATFORMS.map((platform) => {
return isWindows(platform); return isWindows(platform);
})).toEqual([false, false, false, true]); })).toEqual([false, false, false, false, true]);
}); });
test('isValidPlatform', () => { test('isValidPlatform', () => {
expect(PLATFORMS.map((platform) => { expect(PLATFORMS.map((platform) => {
return isValidPlatform(platform); return isValidPlatform(platform);
})).toEqual([true, true, true, true]); })).toEqual([true, true, true, true, true]);
expect(isValidPlatform('fakeos')).toBeFalsy(); expect(isValidPlatform('fakeos')).toBeFalsy();
}); });

View File

@@ -1,6 +1,12 @@
import * as core from '@actions/core'; import * as core from '@actions/core';
const PLATFORMS = ['alpine', 'linux', 'macos', 'windows']; const PLATFORMS = [
'aarch64',
'alpine',
'linux',
'macos',
'windows',
];
const setFailure = (message: string, failCi: boolean): void => { const setFailure = (message: string, failCi: boolean): void => {
failCi ? core.setFailed(message) : core.warning(message); failCi ? core.setFailed(message) : core.warning(message);