ci: Add packaging and artifacts to Github Actions

Github Actions is going to replace AppVeyor in the long term for all release archives, simply because it integrates better with GitHub.
This commit is contained in:
Michael Fabian 'Xaymar' Dirks
2019-10-30 09:57:17 +01:00
committed by Michael Fabian Dirks
parent b07365cdc4
commit f9ad87a56d
3 changed files with 42 additions and 29 deletions
+5 -8
View File
@@ -13,7 +13,7 @@ if ((process.platform == "win32") || (process.platform == "win64")) {
`-DCMAKE_SYSTEM_VERSION=${process.env.CMAKE_SYSTEM_VERSION}`,
`-DCMAKE_PACKAGE_NAME=obs-ffmpeg-encoder`,
'-DCMAKE_INSTALL_PREFIX="build/distrib/"',
'-DCMAKE_PACKAGE_PREFIX="build/"',
'-DCMAKE_PACKAGE_PREFIX="build/package/"',
];
let extra_build = [
@@ -26,9 +26,8 @@ if ((process.platform == "win32") || (process.platform == "win64")) {
if ((process.env.CMAKE_GENERATOR_32 !== undefined) && (process.env.CMAKE_GENERATOR_32 !== "")) {
x32_steps.push(
[ 'cmake', [
'-H.',
'-Bbuild/32',
`-G"${process.env.CMAKE_GENERATOR_32}"`,
'-H.', '-Bbuild/32',
`-G"${process.env.CMAKE_GENERATOR_32}"`, '-AWin32', '-T"host=x64"',
].concat(extra_conf), env ]
);
x32_steps.push(
@@ -42,10 +41,8 @@ if ((process.platform == "win32") || (process.platform == "win64")) {
if ((process.env.CMAKE_GENERATOR_64 !== undefined) && (process.env.CMAKE_GENERATOR_64 !== "")) {
x64_steps.push(
[ 'cmake', [
'-H.',
'-Bbuild/64',
`-G"${process.env.CMAKE_GENERATOR_64}"`,
'-T"host=x64"'
'-H.', '-Bbuild/64',
`-G"${process.env.CMAKE_GENERATOR_64}"`, '-Ax64', '-T"host=x64"',
].concat(extra_conf), env ]
);
x64_steps.push(
+19 -13
View File
@@ -2,20 +2,8 @@
const process = require('process');
const runner = require('./runner.js');
function runRunners(runnerArray, name) {
return new Promise(async (resolve, reject) => {
let local = runnerArray.reverse();
while (local.length > 0) {
let task = local.pop();
let work = new runner(name, task[0], task[1], task[2]);
await work.run();
}
resolve(0);
});
}
let env = process.env;
let steps = [];
if ((process.env.CMAKE_GENERATOR_64 !== undefined) && (process.env.CMAKE_GENERATOR_64 !== "")) {
@@ -50,6 +38,24 @@ if ((process.env.CMAKE_GENERATOR_64 !== undefined) && (process.env.CMAKE_GENERAT
);
}
function runRunners(runnerArray, name) {
return new Promise(async (resolve, reject) => {
let local = runnerArray.reverse();
while (local.length > 0) {
try {
let task = local.pop();
let work = new runner(name, task[0], task[1], task[2]);
await work.run();
} catch (e) {
reject(e);
return;
}
}
resolve(0);
});
}
let promises = [];
promises.push(runRunners(steps, "32-Bit"));
Promise.all(promises).then(