mirror of
https://github.com/CringeStudios/element-desktop.git
synced 2025-01-31 05:29:58 +01:00
Upgrade node-kaytar for modern Visual Studio support & CI native building (#347)
This commit is contained in:
parent
9838d89bdf
commit
ef075489b4
125
.github/workflows/build.yaml
vendored
Normal file
125
.github/workflows/build.yaml
vendored
Normal file
@ -0,0 +1,125 @@
|
|||||||
|
name: Build
|
||||||
|
on:
|
||||||
|
pull_request: { }
|
||||||
|
push:
|
||||||
|
branches: [ develop, master ]
|
||||||
|
jobs:
|
||||||
|
windows:
|
||||||
|
name: Windows
|
||||||
|
runs-on: windows-latest
|
||||||
|
steps:
|
||||||
|
- uses: actions/checkout@v2
|
||||||
|
|
||||||
|
- name: Cache .hak
|
||||||
|
uses: actions/cache@v3
|
||||||
|
with:
|
||||||
|
key: ${{ runner.os }}-${{ hashFiles('./yarn.lock') }}
|
||||||
|
path: |
|
||||||
|
./.hak
|
||||||
|
|
||||||
|
- name: Install nmake
|
||||||
|
uses: ilammy/msvc-dev-cmd@v1
|
||||||
|
|
||||||
|
- name: Install Microsoft Build Tools
|
||||||
|
uses: microsoft/setup-msbuild@v1.1
|
||||||
|
|
||||||
|
# ActiveTCL package on choco is from 2015,
|
||||||
|
# this one is newer but includes more than we need
|
||||||
|
- name: Choco install tclsh
|
||||||
|
shell: pwsh
|
||||||
|
run: |
|
||||||
|
choco install -y magicsplat-tcl-tk --no-progress
|
||||||
|
echo "${HOME}/AppData/Local/Apps/Tcl86/bin" | Out-File -FilePath $env:GITHUB_PATH -Encoding utf8 -Append
|
||||||
|
|
||||||
|
- name: Choco install NetWide Assembler
|
||||||
|
shell: pwsh
|
||||||
|
run: |
|
||||||
|
choco install -y nasm --no-progress
|
||||||
|
echo "C:/Program Files/NASM" | Out-File -FilePath $env:GITHUB_PATH -Encoding utf8 -Append
|
||||||
|
|
||||||
|
- name: Install Rust
|
||||||
|
uses: actions-rs/toolchain@v1
|
||||||
|
with:
|
||||||
|
toolchain: stable
|
||||||
|
|
||||||
|
- uses: actions/setup-node@v3
|
||||||
|
with:
|
||||||
|
cache: "yarn"
|
||||||
|
|
||||||
|
# Does not need branch matching as only analyses this layer
|
||||||
|
- name: Install Deps
|
||||||
|
run: "yarn install --pure-lockfile"
|
||||||
|
|
||||||
|
- name: Build Natives
|
||||||
|
shell: pwsh
|
||||||
|
run: |
|
||||||
|
refreshenv
|
||||||
|
yarn build:native
|
||||||
|
|
||||||
|
- name: Build App
|
||||||
|
run: "yarn build --publish never"
|
||||||
|
|
||||||
|
linux:
|
||||||
|
name: Linux
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
steps:
|
||||||
|
- uses: actions/checkout@v2
|
||||||
|
|
||||||
|
- name: Cache .hak
|
||||||
|
uses: actions/cache@v3
|
||||||
|
with:
|
||||||
|
key: ${{ hashFiles('./yarn.lock') }}
|
||||||
|
path: |
|
||||||
|
./.hak
|
||||||
|
|
||||||
|
- name: Install Rust
|
||||||
|
uses: actions-rs/toolchain@v1
|
||||||
|
with:
|
||||||
|
toolchain: stable
|
||||||
|
|
||||||
|
- uses: actions/setup-node@v3
|
||||||
|
with:
|
||||||
|
cache: "yarn"
|
||||||
|
|
||||||
|
# Does not need branch matching as only analyses this layer
|
||||||
|
- name: Install Deps
|
||||||
|
run: "yarn install --pure-lockfile"
|
||||||
|
|
||||||
|
- name: Build Natives
|
||||||
|
run: "yarn build:native"
|
||||||
|
|
||||||
|
- name: Build App
|
||||||
|
run: "yarn build --publish never"
|
||||||
|
|
||||||
|
macos:
|
||||||
|
name: macOS
|
||||||
|
runs-on: macos-latest
|
||||||
|
steps:
|
||||||
|
- uses: actions/checkout@v2
|
||||||
|
|
||||||
|
- name: Cache .hak
|
||||||
|
uses: actions/cache@v3
|
||||||
|
with:
|
||||||
|
key: ${{ hashFiles('./yarn.lock') }}
|
||||||
|
path: |
|
||||||
|
./.hak
|
||||||
|
|
||||||
|
- name: Install Rust
|
||||||
|
uses: actions-rs/toolchain@v1
|
||||||
|
with:
|
||||||
|
toolchain: stable
|
||||||
|
target: aarch64-apple-darwin
|
||||||
|
|
||||||
|
- uses: actions/setup-node@v3
|
||||||
|
with:
|
||||||
|
cache: "yarn"
|
||||||
|
|
||||||
|
# Does not need branch matching as only analyses this layer
|
||||||
|
- name: Install Deps
|
||||||
|
run: "yarn install --pure-lockfile"
|
||||||
|
|
||||||
|
- name: Build Natives
|
||||||
|
run: "yarn build:native:universal"
|
||||||
|
|
||||||
|
- name: Build App
|
||||||
|
run: "yarn build:universal --publish never"
|
@ -32,7 +32,7 @@ export default async function(hakEnv: HakEnv, moduleInfo: DependencyInfo): Promi
|
|||||||
await buildMatrixSeshat(hakEnv, moduleInfo);
|
await buildMatrixSeshat(hakEnv, moduleInfo);
|
||||||
}
|
}
|
||||||
|
|
||||||
async function buildOpenSslWin(hakEnv, moduleInfo) {
|
async function buildOpenSslWin(hakEnv: HakEnv, moduleInfo: DependencyInfo) {
|
||||||
const version = moduleInfo.cfg.dependencies.openssl;
|
const version = moduleInfo.cfg.dependencies.openssl;
|
||||||
const openSslDir = path.join(moduleInfo.moduleTargetDotHakDir, `openssl-${version}`);
|
const openSslDir = path.join(moduleInfo.moduleTargetDotHakDir, `openssl-${version}`);
|
||||||
|
|
||||||
@ -134,7 +134,7 @@ async function buildOpenSslWin(hakEnv, moduleInfo) {
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
async function buildSqlCipherWin(hakEnv, moduleInfo) {
|
async function buildSqlCipherWin(hakEnv: HakEnv, moduleInfo: DependencyInfo) {
|
||||||
const version = moduleInfo.cfg.dependencies.sqlcipher;
|
const version = moduleInfo.cfg.dependencies.sqlcipher;
|
||||||
const sqlCipherDir = path.join(moduleInfo.moduleTargetDotHakDir, `sqlcipher-${version}`);
|
const sqlCipherDir = path.join(moduleInfo.moduleTargetDotHakDir, `sqlcipher-${version}`);
|
||||||
const buildDir = path.join(sqlCipherDir, 'bld');
|
const buildDir = path.join(sqlCipherDir, 'bld');
|
||||||
@ -171,7 +171,7 @@ async function buildSqlCipherWin(hakEnv, moduleInfo) {
|
|||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
async function buildSqlCipherUnix(hakEnv, moduleInfo) {
|
async function buildSqlCipherUnix(hakEnv: HakEnv, moduleInfo: DependencyInfo) {
|
||||||
const version = moduleInfo.cfg.dependencies.sqlcipher;
|
const version = moduleInfo.cfg.dependencies.sqlcipher;
|
||||||
const sqlCipherDir = path.join(moduleInfo.moduleTargetDotHakDir, `sqlcipher-${version}`);
|
const sqlCipherDir = path.join(moduleInfo.moduleTargetDotHakDir, `sqlcipher-${version}`);
|
||||||
|
|
||||||
@ -264,7 +264,7 @@ async function buildSqlCipherUnix(hakEnv, moduleInfo) {
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
async function buildMatrixSeshat(hakEnv, moduleInfo) {
|
async function buildMatrixSeshat(hakEnv: HakEnv, moduleInfo: DependencyInfo) {
|
||||||
// seshat now uses n-api so we shouldn't need to specify a node version to
|
// seshat now uses n-api so we shouldn't need to specify a node version to
|
||||||
// build against, but it does seems to still need something in here, so leaving
|
// build against, but it does seems to still need something in here, so leaving
|
||||||
// it for now: we should confirm how much of this it still actually needs.
|
// it for now: we should confirm how much of this it still actually needs.
|
||||||
|
@ -42,6 +42,7 @@ export default async function(hakEnv: HakEnv, moduleInfo: DependencyInfo): Promi
|
|||||||
];
|
];
|
||||||
if (hakEnv.isWin()) {
|
if (hakEnv.isWin()) {
|
||||||
tools.push(['perl', '--version']); // for openssl configure
|
tools.push(['perl', '--version']); // for openssl configure
|
||||||
|
tools.push(['nasm', '-v']); // for openssl building
|
||||||
tools.push(['patch', '--version']); // to patch sqlcipher Makefile.msc
|
tools.push(['patch', '--version']); // to patch sqlcipher Makefile.msc
|
||||||
tools.push(['nmake', '/?']);
|
tools.push(['nmake', '/?']);
|
||||||
} else {
|
} else {
|
||||||
|
@ -84,8 +84,8 @@
|
|||||||
"typescript": "4.5.5"
|
"typescript": "4.5.5"
|
||||||
},
|
},
|
||||||
"hakDependencies": {
|
"hakDependencies": {
|
||||||
"matrix-seshat": "^2.3.0",
|
"matrix-seshat": "^2.3.3",
|
||||||
"keytar": "^5.6.0"
|
"keytar": "^7.9.0"
|
||||||
},
|
},
|
||||||
"build": {
|
"build": {
|
||||||
"appId": "im.riot.app",
|
"appId": "im.riot.app",
|
||||||
|
Loading…
x
Reference in New Issue
Block a user