mirror of
https://github.com/CringeStudios/element-desktop.git
synced 2025-01-18 23:44:59 +01:00
Iterate ARM support in CI (#587)
This commit is contained in:
parent
7a1a0fabdb
commit
1654030c5f
4
.github/workflows/build_and_test.yaml
vendored
4
.github/workflows/build_and_test.yaml
vendored
@ -19,7 +19,7 @@ jobs:
|
||||
uses: ./.github/workflows/build_windows.yaml
|
||||
strategy:
|
||||
matrix:
|
||||
arch: [x64, x86, arm64]
|
||||
arch: [x64, x86]
|
||||
with:
|
||||
arch: ${{ matrix.arch }}
|
||||
|
||||
@ -92,7 +92,7 @@ jobs:
|
||||
if: matrix.prepare_cmd
|
||||
|
||||
- name: Run tests
|
||||
uses: GabrielBB/xvfb-action@v1
|
||||
uses: coactions/setup-xvfb@b6b4fcfb9f5a895edadc3bc76318fae0ac17c8b3 # v1
|
||||
timeout-minutes: 5
|
||||
with:
|
||||
run: "yarn test"
|
||||
|
1
.github/workflows/build_linux.yaml
vendored
1
.github/workflows/build_linux.yaml
vendored
@ -38,6 +38,7 @@ jobs:
|
||||
if: steps.cache.outputs.cache-hit != 'true'
|
||||
uses: actions-rs/toolchain@v1
|
||||
with:
|
||||
default: true
|
||||
toolchain: stable
|
||||
|
||||
- name: Install libsqlcipher-dev
|
||||
|
1
.github/workflows/build_macos.yaml
vendored
1
.github/workflows/build_macos.yaml
vendored
@ -54,6 +54,7 @@ jobs:
|
||||
if: steps.cache.outputs.cache-hit != 'true'
|
||||
uses: actions-rs/toolchain@v1
|
||||
with:
|
||||
default: true
|
||||
toolchain: stable
|
||||
target: aarch64-apple-darwin
|
||||
|
||||
|
3
.github/workflows/build_windows.yaml
vendored
3
.github/workflows/build_windows.yaml
vendored
@ -68,7 +68,7 @@ jobs:
|
||||
id: cache
|
||||
uses: actions/cache@v3
|
||||
with:
|
||||
key: ${{ runner.os }}-${{ hashFiles('hakDependencies.json', 'electronVersion') }}
|
||||
key: ${{ runner.os }}-${{ inputs.arch }}-${{ hashFiles('hakDependencies.json', 'electronVersion') }}
|
||||
path: |
|
||||
./.hak
|
||||
|
||||
@ -97,6 +97,7 @@ jobs:
|
||||
if: steps.cache.outputs.cache-hit != 'true'
|
||||
uses: actions-rs/toolchain@v1
|
||||
with:
|
||||
default: true
|
||||
toolchain: stable
|
||||
target: ${{ steps.config.outputs.target }}
|
||||
|
||||
|
@ -22,6 +22,15 @@ import fsExtra from "fs-extra";
|
||||
import HakEnv from "../../scripts/hak/hakEnv";
|
||||
import { DependencyInfo } from "../../scripts/hak/dep";
|
||||
|
||||
type WinConfiguration =
|
||||
| "VC-WIN32"
|
||||
| "VC-WIN64A"
|
||||
| "VC-WIN64-ARM"
|
||||
| "VC-WIN64-CLANGASM-ARM"
|
||||
| "VC-CLANG-WIN64-CLANGASM-ARM"
|
||||
| "VC-WIN32-HYBRIDCRT"
|
||||
| "VC-WIN64A-HYBRIDCRT";
|
||||
|
||||
export default async function (hakEnv: HakEnv, moduleInfo: DependencyInfo): Promise<void> {
|
||||
if (hakEnv.isWin()) {
|
||||
await buildOpenSslWin(hakEnv, moduleInfo);
|
||||
@ -36,7 +45,18 @@ async function buildOpenSslWin(hakEnv: HakEnv, moduleInfo: DependencyInfo): Prom
|
||||
const version = moduleInfo.cfg.dependencies.openssl;
|
||||
const openSslDir = path.join(moduleInfo.moduleTargetDotHakDir, `openssl-${version}`);
|
||||
|
||||
const openSslArch = hakEnv.getTargetArch() === "x64" ? "VC-WIN64A" : "VC-WIN32";
|
||||
let openSslArch: WinConfiguration;
|
||||
switch (hakEnv.getTargetArch()) {
|
||||
case "x64":
|
||||
openSslArch = "VC-WIN64A";
|
||||
break;
|
||||
case "ia32":
|
||||
openSslArch = "VC-WIN32";
|
||||
break;
|
||||
case "arm64":
|
||||
openSslArch = "VC-WIN64-ARM";
|
||||
break;
|
||||
}
|
||||
|
||||
console.log("Building openssl in " + openSslDir);
|
||||
await new Promise<void>((resolve, reject) => {
|
||||
|
@ -100,10 +100,10 @@ const x8664PcWindowsMsvc: WindowsTarget = {
|
||||
};
|
||||
|
||||
const aarch64WindowsMsvc: WindowsTarget = {
|
||||
id: 'aarch64-pc-windows-msvc',
|
||||
platform: 'win32',
|
||||
arch: 'arm64',
|
||||
vcVarsArch: 'arm64',
|
||||
id: "aarch64-pc-windows-msvc",
|
||||
platform: "win32",
|
||||
arch: "arm64",
|
||||
vcVarsArch: "arm64",
|
||||
};
|
||||
|
||||
const x8664UnknownLinuxGnu: LinuxTarget = {
|
||||
@ -170,7 +170,7 @@ export const TARGETS: Record<TargetId, Target> = {
|
||||
// Windows
|
||||
"i686-pc-windows-msvc": i686PcWindowsMsvc,
|
||||
"x86_64-pc-windows-msvc": x8664PcWindowsMsvc,
|
||||
'aarch64-pc-windows-msvc': aarch64WindowsMsvc,
|
||||
"aarch64-pc-windows-msvc": aarch64WindowsMsvc,
|
||||
// Linux
|
||||
"i686-unknown-linux-musl": i686UnknownLinuxMusl,
|
||||
"i686-unknown-linux-gnu": i686UnknownLinuxGnu,
|
||||
|
Loading…
Reference in New Issue
Block a user