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/deploy.yml
|
||||
|
||||
# - job: macOS
|
||||
# pool:
|
||||
# vmImage: 'macOS-10.13'
|
||||
# steps:
|
||||
# - template: templates/npm-steps.yml # Template reference
|
||||
#
|
||||
# - job: Windows
|
||||
# pool:
|
||||
# vmImage: 'vs2017-win2016'
|
||||
# steps:
|
||||
# - script: echo This script runs before the template's steps, only on Windows.
|
||||
# - template: templates/npm-steps.yml # Template reference
|
||||
# - script: echo This step runs after the template's steps.
|
||||
- job: macOS
|
||||
pool:
|
||||
vmImage: 'macOS-10.14'
|
||||
steps:
|
||||
- template: ci/test.yml
|
||||
- template: ci/build-macos.yml
|
||||
- template: ci/deploy.yml
|
||||
|
||||
- job: Windows
|
||||
pool:
|
||||
vmImage: 'vs2019-win2019'
|
||||
steps:
|
||||
- template: ci/test.yml
|
||||
- template: ci/build-win.yml
|
||||
- template: ci/deploy.yml
|
|
@ -4,6 +4,6 @@ steps:
|
|||
cd target/release/
|
||||
tar czf "espanso-linux.tar.gz" espanso
|
||||
cd ../..
|
||||
cp target/release/espanso-linux.gz .
|
||||
cp target/release/espanso-*.gz .
|
||||
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")
|
||||
os.makedirs(TARGET_DIR, exist_ok=True)
|
||||
|
||||
INSTALLER_NAME = f"espanso-win-{package_info.version}"
|
||||
INSTALLER_NAME = f"espanso-win-installer"
|
||||
|
||||
# Inno setup
|
||||
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)
|
||||
|
||||
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))
|
||||
subprocess.run(["tar",
|
||||
"-C", os.path.abspath("target/release"),
|
||||
|
|
Loading…
Reference in New Issue
Block a user