Merge branch 'master' into dev
This commit is contained in:
commit
75a210fd1e
4
.github/FUNDING.yml
vendored
Normal file
4
.github/FUNDING.yml
vendored
Normal file
|
@ -0,0 +1,4 @@
|
|||
# These are supported funding model platforms
|
||||
|
||||
github: ['federico-terzi']
|
||||
custom: ['https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=FHNLR5DRS267E&source=url']
|
|
@ -19,6 +19,16 @@ jobs:
|
|||
- template: ci/build-linux.yml
|
||||
- template: ci/deploy.yml
|
||||
|
||||
- job: UbuntuDEB
|
||||
pool:
|
||||
vmImage: 'ubuntu-latest'
|
||||
steps:
|
||||
- script: |
|
||||
sudo docker build -t espanso-ubuntu . -f ci/ubuntu/Dockerfile
|
||||
sudo docker run --rm -v "$(pwd):/shared" espanso-ubuntu espanso/ci/ubuntu/build_deb.sh
|
||||
displayName: Setting up docker
|
||||
- template: ci/deploy.yml
|
||||
|
||||
- job: macOS
|
||||
pool:
|
||||
vmImage: 'macOS-10.14'
|
||||
|
|
|
@ -9,10 +9,3 @@ steps:
|
|||
ls -la
|
||||
displayName: "Cargo build and packaging for Linux"
|
||||
|
||||
- script: |
|
||||
cargo install cargo-deb
|
||||
cargo deb
|
||||
cp target/release/debian/espanso*amd64.deb espanso-debian-amd64.deb
|
||||
sha256sum espanso-*amd64.deb | awk '{ print $1 }' > espanso-debian-amd64-sha256.txt
|
||||
ls -la
|
||||
displayName: "Packaging deb package"
|
38
ci/ubuntu/Dockerfile
Normal file
38
ci/ubuntu/Dockerfile
Normal file
|
@ -0,0 +1,38 @@
|
|||
FROM ubuntu:18.04
|
||||
|
||||
RUN apt-get update \
|
||||
&& apt-get install -y libssl-dev \
|
||||
libxdo-dev libxtst-dev libx11-dev \
|
||||
wget git cmake build-essential pkg-config
|
||||
|
||||
ENV RUSTUP_HOME=/usr/local/rustup \
|
||||
CARGO_HOME=/usr/local/cargo \
|
||||
PATH=/usr/local/cargo/bin:$PATH \
|
||||
RUST_VERSION=1.41.0
|
||||
|
||||
RUN set -eux; \
|
||||
dpkgArch="$(dpkg --print-architecture)"; \
|
||||
case "${dpkgArch##*-}" in \
|
||||
amd64) rustArch='x86_64-unknown-linux-gnu'; rustupSha256='ad1f8b5199b3b9e231472ed7aa08d2e5d1d539198a15c5b1e53c746aad81d27b' ;; \
|
||||
armhf) rustArch='armv7-unknown-linux-gnueabihf'; rustupSha256='6c6c3789dabf12171c7f500e06d21d8004b5318a5083df8b0b02c0e5ef1d017b' ;; \
|
||||
arm64) rustArch='aarch64-unknown-linux-gnu'; rustupSha256='26942c80234bac34b3c1352abbd9187d3e23b43dae3cf56a9f9c1ea8ee53076d' ;; \
|
||||
i386) rustArch='i686-unknown-linux-gnu'; rustupSha256='27ae12bc294a34e566579deba3e066245d09b8871dc021ef45fc715dced05297' ;; \
|
||||
*) echo >&2 "unsupported architecture: ${dpkgArch}"; exit 1 ;; \
|
||||
esac; \
|
||||
url="https://static.rust-lang.org/rustup/archive/1.21.1/${rustArch}/rustup-init"; \
|
||||
wget "$url"; \
|
||||
echo "${rustupSha256} *rustup-init" | sha256sum -c -; \
|
||||
chmod +x rustup-init; \
|
||||
./rustup-init -y --no-modify-path --profile minimal --default-toolchain $RUST_VERSION; \
|
||||
rm rustup-init; \
|
||||
chmod -R a+w $RUSTUP_HOME $CARGO_HOME; \
|
||||
rustup --version; \
|
||||
cargo --version; \
|
||||
rustc --version;
|
||||
|
||||
RUN mkdir espanso
|
||||
|
||||
COPY . espanso
|
||||
|
||||
RUN cd espanso \
|
||||
&& cargo install cargo-deb
|
16
ci/ubuntu/build_deb.sh
Executable file
16
ci/ubuntu/build_deb.sh
Executable file
|
@ -0,0 +1,16 @@
|
|||
#!/bin/bash
|
||||
|
||||
echo "Testing espanso..."
|
||||
cd espanso
|
||||
cargo test --release
|
||||
|
||||
echo "Building espanso and packaging deb"
|
||||
cargo deb
|
||||
|
||||
cd ..
|
||||
cp espanso/target/debian/espanso*.deb espanso-debian-amd64.deb
|
||||
sha256sum espanso-debian-amd64.deb > espanso-debian-amd64-sha256.txt
|
||||
ls -la
|
||||
|
||||
echo "Copying to mounted volume"
|
||||
cp espanso-debian-* /shared
|
Loading…
Reference in New Issue
Block a user