Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: allow for aarch64 build #960

Merged
merged 1 commit into from Apr 20, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
2 changes: 1 addition & 1 deletion action.yml
Expand Up @@ -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'
required: false
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
override_branch:
description: 'Specify the branch name'
Expand Down
12 changes: 9 additions & 3 deletions dist/index.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion dist/index.js.map

Large diffs are not rendered by default.

6 changes: 4 additions & 2 deletions src/helpers.test.ts
Expand Up @@ -39,6 +39,7 @@ test('getBaseUrl', () => {
expect(PLATFORMS.map((platform) => {
return getBaseUrl(platform, 'latest');
})).toEqual([
'https://uploader.codecov.io/latest/aarch64/codecov',
'https://uploader.codecov.io/latest/alpine/codecov',
'https://uploader.codecov.io/latest/linux/codecov',
'https://uploader.codecov.io/latest/macos/codecov',
Expand All @@ -48,6 +49,7 @@ test('getBaseUrl', () => {
expect(PLATFORMS.map((platform) => {
return getBaseUrl(platform, 'v0.1.0_8880');
})).toEqual([
'https://uploader.codecov.io/v0.1.0_8880/aarch64/codecov',

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

https://uploader.codecov.io/v0.5.0/aarch64/codecov is currently the only version available for aarch64

'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/macos/codecov',
Expand All @@ -58,13 +60,13 @@ test('getBaseUrl', () => {
test('isWindows', () => {
expect(PLATFORMS.map((platform) => {
return isWindows(platform);
})).toEqual([false, false, false, true]);
})).toEqual([false, false, false, false, true]);
});

test('isValidPlatform', () => {
expect(PLATFORMS.map((platform) => {
return isValidPlatform(platform);
})).toEqual([true, true, true, true]);
})).toEqual([true, true, true, true, true]);

expect(isValidPlatform('fakeos')).toBeFalsy();
});
8 changes: 7 additions & 1 deletion src/helpers.ts
@@ -1,6 +1,12 @@
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 => {
failCi ? core.setFailed(message) : core.warning(message);
Expand Down