fix(ci): preserve rustup-related env-vars in ci build and fix a few errors

This commit is contained in:
Federico Terzi 2021-10-03 18:29:10 +02:00
parent 065e24b7f2
commit 912a1fd209
4 changed files with 11 additions and 11 deletions

View File

@ -3,7 +3,8 @@ FROM ubuntu:18.04
RUN apt-get update \ RUN apt-get update \
&& apt-get install -y libssl-dev \ && apt-get install -y libssl-dev \
libxdo-dev libxtst-dev libx11-dev \ libxdo-dev libxtst-dev libx11-dev \
wget git cmake build-essential pkg-config libxkbcommon-dev libwxgtk3.0-gtk3-dev libdbus-1-dev \
wget git file build-essential pkg-config
ENV RUSTUP_HOME=/usr/local/rustup \ ENV RUSTUP_HOME=/usr/local/rustup \
CARGO_HOME=/usr/local/cargo \ CARGO_HOME=/usr/local/cargo \
@ -30,9 +31,8 @@ RUN set -eux; \
cargo --version; \ cargo --version; \
rustc --version; rustc --version;
RUN mkdir espanso RUN mkdir espanso && cargo install --force cargo-make
COPY . espanso COPY . espanso
RUN cd espanso \ RUN cd espanso
&& cargo install --force cargo-make

View File

@ -61,7 +61,7 @@ jobs:
- uses: actions/upload-artifact@v2 - uses: actions/upload-artifact@v2
name: "Upload artifacts" name: "Upload artifacts"
with: with:
name: Windows Installer and Portable name: Windows Artifacts
path: | path: |
target/windows/installer/Espanso-Win-Installer-x86_64.exe target/windows/installer/Espanso-Win-Installer-x86_64.exe
target/windows/Espanso-Win-Portable-x86_64.zip target/windows/Espanso-Win-Portable-x86_64.zip
@ -89,13 +89,13 @@ jobs:
- uses: actions/upload-artifact@v2 - uses: actions/upload-artifact@v2
name: "Upload artifacts" name: "Upload artifacts"
with: with:
name: Linux X11 AppImage name: Linux X11 Artifacts
path: | path: |
shared/Espanso-X11.AppImage Espanso-X11.AppImage
shared/Espanso-X11.AppImage.sha256.txt Espanso-X11.AppImage.sha256.txt
- name: Upload artifacts to Github Releases - name: Upload artifacts to Github Releases
run: | run: |
gh release upload ${{ needs.extract-version.outputs.espanso_version }} shared/Espanso-X11.AppImage shared/Espanso-X11.AppImage.sha256.txt gh release upload ${{ needs.extract-version.outputs.espanso_version }} Espanso-X11.AppImage Espanso-X11.AppImage.sha256.txt
# macos-intel: # macos-intel:
# runs-on: macos-11 # runs-on: macos-11

View File

@ -71,7 +71,7 @@ fn main() {
// nested cargo build call. // nested cargo build call.
let all_vars = envmnt::vars(); let all_vars = envmnt::vars();
for (key, _) in all_vars { for (key, _) in all_vars {
if key.starts_with("CARGO") || key.starts_with("RUST") { if key.starts_with("CARGO") || (key.starts_with("RUST") && !key.starts_with("RUSTUP")) {
//println!("Removing {}", key); //println!("Removing {}", key);
cmd.env_remove(key); cmd.env_remove(key);
} }

View File

@ -64,7 +64,7 @@ fn main() {
// nested cargo build call. // nested cargo build call.
let all_vars = envmnt::vars(); let all_vars = envmnt::vars();
for (key, _) in all_vars { for (key, _) in all_vars {
if key.starts_with("CARGO") || key.starts_with("RUST") { if key.starts_with("CARGO") || (key.starts_with("RUST") && !key.starts_with("RUSTUP")) {
//println!("Removing {}", key); //println!("Removing {}", key);
cmd.env_remove(key); cmd.env_remove(key);
} }