Add experimental CI Pipelines for Mac and Windows
This commit is contained in:
parent
3df6210735
commit
ff8b993a61
|
@ -19,16 +19,18 @@ jobs:
|
||||||
- template: ci/build-linux.yml
|
- template: ci/build-linux.yml
|
||||||
- template: ci/deploy.yml
|
- template: ci/deploy.yml
|
||||||
|
|
||||||
# - job: macOS
|
- job: macOS
|
||||||
# pool:
|
pool:
|
||||||
# vmImage: 'macOS-10.13'
|
vmImage: 'macOS-10.14'
|
||||||
# steps:
|
steps:
|
||||||
# - template: templates/npm-steps.yml # Template reference
|
- template: ci/test.yml
|
||||||
#
|
- template: ci/build-macos.yml
|
||||||
# - job: Windows
|
- template: ci/deploy.yml
|
||||||
# pool:
|
|
||||||
# vmImage: 'vs2017-win2016'
|
- job: Windows
|
||||||
# steps:
|
pool:
|
||||||
# - script: echo This script runs before the template's steps, only on Windows.
|
vmImage: 'vs2019-win2019'
|
||||||
# - template: templates/npm-steps.yml # Template reference
|
steps:
|
||||||
# - script: echo This step runs after the template's steps.
|
- template: ci/test.yml
|
||||||
|
- template: ci/build-win.yml
|
||||||
|
- template: ci/deploy.yml
|
|
@ -4,6 +4,6 @@ steps:
|
||||||
cd target/release/
|
cd target/release/
|
||||||
tar czf "espanso-linux.tar.gz" espanso
|
tar czf "espanso-linux.tar.gz" espanso
|
||||||
cd ../..
|
cd ../..
|
||||||
cp target/release/espanso-linux.gz .
|
cp target/release/espanso-*.gz .
|
||||||
ls -la
|
ls -la
|
||||||
displayName: "Cargo build and packaging"
|
displayName: "Cargo build and packaging for Linux"
|
15
ci/build-macos.yml
Normal file
15
ci/build-macos.yml
Normal file
|
@ -0,0 +1,15 @@
|
||||||
|
steps:
|
||||||
|
- task: UsePythonVersion@0
|
||||||
|
inputs:
|
||||||
|
versionSpec: '3.6'
|
||||||
|
addToPath: true
|
||||||
|
|
||||||
|
- script: |
|
||||||
|
python -m pip install toml click
|
||||||
|
displayName: Installing python dependencies
|
||||||
|
|
||||||
|
- script: |
|
||||||
|
python packager.py build
|
||||||
|
cp target/release/espanso-*.gz .
|
||||||
|
ls -la
|
||||||
|
displayName: "Cargo build and packaging for MacOS"
|
15
ci/build-win.yml
Normal file
15
ci/build-win.yml
Normal file
|
@ -0,0 +1,15 @@
|
||||||
|
steps:
|
||||||
|
- task: UsePythonVersion@0
|
||||||
|
inputs:
|
||||||
|
versionSpec: '3.6'
|
||||||
|
addToPath: true
|
||||||
|
|
||||||
|
- script: |
|
||||||
|
python -m pip install toml click
|
||||||
|
displayName: Installing python dependencies
|
||||||
|
|
||||||
|
- script: |
|
||||||
|
python packager.py build
|
||||||
|
copy "target\\release\\espanso-win-installer.exe" "espanso-win-installer.exe"
|
||||||
|
dir
|
||||||
|
displayName: "Build and packaging for Windows"
|
|
@ -75,7 +75,7 @@ def build_windows(package_info):
|
||||||
TARGET_DIR = os.path.join(PACKAGER_TARGET_DIR, "win")
|
TARGET_DIR = os.path.join(PACKAGER_TARGET_DIR, "win")
|
||||||
os.makedirs(TARGET_DIR, exist_ok=True)
|
os.makedirs(TARGET_DIR, exist_ok=True)
|
||||||
|
|
||||||
INSTALLER_NAME = f"espanso-win-{package_info.version}"
|
INSTALLER_NAME = f"espanso-win-installer"
|
||||||
|
|
||||||
# Inno setup
|
# Inno setup
|
||||||
shutil.copy("packager/win/modpath.iss", os.path.join(TARGET_DIR, "modpath.iss"))
|
shutil.copy("packager/win/modpath.iss", os.path.join(TARGET_DIR, "modpath.iss"))
|
||||||
|
@ -116,7 +116,7 @@ def build_mac(package_info):
|
||||||
os.makedirs(TARGET_DIR, exist_ok=True)
|
os.makedirs(TARGET_DIR, exist_ok=True)
|
||||||
|
|
||||||
print("Compressing release to archive...")
|
print("Compressing release to archive...")
|
||||||
target_name = f"espanso-mac-{package_info.version}.tar.gz"
|
target_name = f"espanso-mac.tar.gz"
|
||||||
archive_target = os.path.abspath(os.path.join(TARGET_DIR, target_name))
|
archive_target = os.path.abspath(os.path.join(TARGET_DIR, target_name))
|
||||||
subprocess.run(["tar",
|
subprocess.run(["tar",
|
||||||
"-C", os.path.abspath("target/release"),
|
"-C", os.path.abspath("target/release"),
|
||||||
|
|
Loading…
Reference in New Issue
Block a user