Compare commits
7 Commits
@@ -11,7 +11,7 @@ jobs:
|
||||
|
||||
strategy:
|
||||
matrix:
|
||||
os: [ubuntu-latest, windows-latest, macOS-latest]
|
||||
os: [ubuntu-latest, windows-latest, windows-11-arm, macOS-latest]
|
||||
version: [latest, branch@master, branch@dev]
|
||||
|
||||
runs-on: ${{ matrix.os }}
|
||||
|
||||
Vendored
+26
-3
@@ -82512,6 +82512,10 @@ async function getBuildCachePath() {
|
||||
const projectRootPath = getProjectRootPath();
|
||||
if (projectRootPath && projectRootPath !== '' && fsutils.isDir(projectRootPath)) {
|
||||
const options = {};
|
||||
options.env = {
|
||||
...process.env,
|
||||
XMAKE_ROOT: 'y',
|
||||
};
|
||||
options.cwd = projectRootPath;
|
||||
options.listeners = {
|
||||
stdout: (data) => {
|
||||
@@ -82599,7 +82603,12 @@ async function saveBuildCache() {
|
||||
await io.cp(buildCachePath, fullCachePath, {
|
||||
recursive: true,
|
||||
});
|
||||
await (0, exec_1.exec)('xmake', ['l', 'os.touch', path.join(fullCachePath, 'build_cache_saved.txt')]);
|
||||
const options = {};
|
||||
options.env = {
|
||||
...process.env,
|
||||
XMAKE_ROOT: 'y',
|
||||
};
|
||||
await (0, exec_1.exec)('xmake', ['l', 'os.touch', path.join(fullCachePath, 'build_cache_saved.txt')], options);
|
||||
await cache.saveCache([buildCacheFolder], buildCacheKey);
|
||||
}
|
||||
}
|
||||
@@ -82801,6 +82810,10 @@ async function getPackageCacheKey() {
|
||||
const projectRootPath = getProjectRootPath();
|
||||
if (projectRootPath && projectRootPath !== '' && fsutils.isDir(projectRootPath)) {
|
||||
const options = {};
|
||||
options.env = {
|
||||
...process.env,
|
||||
XMAKE_ROOT: 'y',
|
||||
};
|
||||
options.cwd = projectRootPath;
|
||||
options.listeners = {
|
||||
stdout: (data) => {
|
||||
@@ -82816,6 +82829,10 @@ async function getPackageCacheKey() {
|
||||
async function getPackageCachePath() {
|
||||
let packageCachePath = '';
|
||||
const options = {};
|
||||
options.env = {
|
||||
...process.env,
|
||||
XMAKE_ROOT: 'y',
|
||||
};
|
||||
options.listeners = {
|
||||
stdout: (data) => {
|
||||
packageCachePath += data.toString();
|
||||
@@ -82880,6 +82897,12 @@ async function savePackageCache() {
|
||||
await io.cp(packageCachePath, fullCachePath, {
|
||||
recursive: true,
|
||||
});
|
||||
const options = {};
|
||||
options.env = {
|
||||
...process.env,
|
||||
XMAKE_ROOT: 'y',
|
||||
};
|
||||
await (0, exec_1.exec)('xmake', ['l', 'os.touch', path.join(fullCachePath, 'package_cache_saved.txt')], options);
|
||||
await cache.saveCache([packageCacheFolder], packageCacheKey);
|
||||
}
|
||||
}
|
||||
@@ -83202,7 +83225,7 @@ function getInstallerUrl(version, latest) {
|
||||
let ver = version.version;
|
||||
switch (version.type) {
|
||||
case 'heads': {
|
||||
const arch = os.arch() === 'x64' ? 'win64' : 'win32';
|
||||
const arch = os.arch() === 'arm64' ? 'arm64' : os.arch() === 'x64' ? 'win64' : 'win32';
|
||||
const latestver = latest.version;
|
||||
if (ver !== 'dev' && ver !== 'master') {
|
||||
ver = latestver;
|
||||
@@ -83216,7 +83239,7 @@ function getInstallerUrl(version, latest) {
|
||||
throw new Error('Sha builds for windows is not supported');
|
||||
}
|
||||
case 'tags': {
|
||||
const arch = os.arch() === 'x64' ? 'win64' : 'win32';
|
||||
const arch = os.arch() === 'arm64' ? 'arm64' : os.arch() === 'x64' ? 'win64' : 'win32';
|
||||
return semver.gt(ver, '2.2.6')
|
||||
? `https://github.com/xmake-io/xmake/releases/download/${ver}/xmake-${ver}.${arch}.exe`
|
||||
: `https://github.com/xmake-io/xmake/releases/download/${ver}/xmake-${ver}.exe`;
|
||||
|
||||
Generated
+2
-2
@@ -1,12 +1,12 @@
|
||||
{
|
||||
"name": "github-action-setup-xmake",
|
||||
"version": "1.1.5",
|
||||
"version": "1.1.8",
|
||||
"lockfileVersion": 3,
|
||||
"requires": true,
|
||||
"packages": {
|
||||
"": {
|
||||
"name": "github-action-setup-xmake",
|
||||
"version": "1.1.5",
|
||||
"version": "1.1.8",
|
||||
"license": "GPL-3.0-or-later",
|
||||
"dependencies": {
|
||||
"@actions/cache": "^3.2.4",
|
||||
|
||||
+1
-1
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "github-action-setup-xmake",
|
||||
"version": "1.1.5",
|
||||
"version": "1.1.8",
|
||||
"description": "Set up your GitHub Actions workflow with a specific version of xmake",
|
||||
"main": "dist/index.js",
|
||||
"author": "OpportunityLiu",
|
||||
|
||||
+10
-1
@@ -56,6 +56,10 @@ async function getBuildCachePath(): Promise<string> {
|
||||
const projectRootPath = getProjectRootPath();
|
||||
if (projectRootPath && projectRootPath !== '' && fsutils.isDir(projectRootPath)) {
|
||||
const options: ExecOptions = {};
|
||||
options.env = {
|
||||
...process.env,
|
||||
XMAKE_ROOT: 'y',
|
||||
};
|
||||
options.cwd = projectRootPath;
|
||||
options.listeners = {
|
||||
stdout: (data: Buffer) => {
|
||||
@@ -153,7 +157,12 @@ export async function saveBuildCache(): Promise<void> {
|
||||
await io.cp(buildCachePath, fullCachePath, {
|
||||
recursive: true,
|
||||
});
|
||||
await exec('xmake', ['l', 'os.touch', path.join(fullCachePath, 'build_cache_saved.txt')]);
|
||||
const options: ExecOptions = {};
|
||||
options.env = {
|
||||
...process.env,
|
||||
XMAKE_ROOT: 'y',
|
||||
};
|
||||
await exec('xmake', ['l', 'os.touch', path.join(fullCachePath, 'build_cache_saved.txt')], options);
|
||||
await cache.saveCache([buildCacheFolder], buildCacheKey);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -27,6 +27,10 @@ async function getPackageCacheKey(): Promise<string> {
|
||||
const projectRootPath = getProjectRootPath();
|
||||
if (projectRootPath && projectRootPath !== '' && fsutils.isDir(projectRootPath)) {
|
||||
const options: ExecOptions = {};
|
||||
options.env = {
|
||||
...process.env,
|
||||
XMAKE_ROOT: 'y',
|
||||
};
|
||||
options.cwd = projectRootPath;
|
||||
options.listeners = {
|
||||
stdout: (data: Buffer) => {
|
||||
@@ -43,6 +47,10 @@ async function getPackageCacheKey(): Promise<string> {
|
||||
async function getPackageCachePath(): Promise<string> {
|
||||
let packageCachePath = '';
|
||||
const options: ExecOptions = {};
|
||||
options.env = {
|
||||
...process.env,
|
||||
XMAKE_ROOT: 'y',
|
||||
};
|
||||
options.listeners = {
|
||||
stdout: (data: Buffer) => {
|
||||
packageCachePath += data.toString();
|
||||
@@ -112,6 +120,12 @@ export async function savePackageCache(): Promise<void> {
|
||||
await io.cp(packageCachePath, fullCachePath, {
|
||||
recursive: true,
|
||||
});
|
||||
const options: ExecOptions = {};
|
||||
options.env = {
|
||||
...process.env,
|
||||
XMAKE_ROOT: 'y',
|
||||
};
|
||||
await exec('xmake', ['l', 'os.touch', path.join(fullCachePath, 'package_cache_saved.txt')], options);
|
||||
await cache.saveCache([packageCacheFolder], packageCacheKey);
|
||||
}
|
||||
}
|
||||
|
||||
+2
-2
@@ -14,7 +14,7 @@ function getInstallerUrl(version: GitVersion, latest: GitVersion): string {
|
||||
let ver = version.version;
|
||||
switch (version.type) {
|
||||
case 'heads': {
|
||||
const arch = os.arch() === 'x64' ? 'win64' : 'win32';
|
||||
const arch = os.arch() === 'arm64' ? 'arm64' : os.arch() === 'x64' ? 'win64' : 'win32';
|
||||
const latestver = latest.version;
|
||||
if (ver !== 'dev' && ver !== 'master') {
|
||||
ver = latestver;
|
||||
@@ -28,7 +28,7 @@ function getInstallerUrl(version: GitVersion, latest: GitVersion): string {
|
||||
throw new Error('Sha builds for windows is not supported');
|
||||
}
|
||||
case 'tags': {
|
||||
const arch = os.arch() === 'x64' ? 'win64' : 'win32';
|
||||
const arch = os.arch() === 'arm64' ? 'arm64' : os.arch() === 'x64' ? 'win64' : 'win32';
|
||||
return semver.gt(ver, '2.2.6')
|
||||
? `https://github.com/xmake-io/xmake/releases/download/${ver}/xmake-${ver}.${arch}.exe`
|
||||
: `https://github.com/xmake-io/xmake/releases/download/${ver}/xmake-${ver}.exe`;
|
||||
|
||||
Reference in New Issue
Block a user