From bce0faa1c2dc221b0ff77d2cd647bfb2a48ffa7e Mon Sep 17 00:00:00 2001 From: Ellie Huxtable Date: Wed, 8 May 2024 12:09:04 +0100 Subject: feat: add background daemon (#2006) * init daemon crate * wip * minimal functioning daemon, needs cleanup for sure * better errors * add signal cleanup * logging * things * add sync worker * move daemon crate * 30s -> 5mins * make clippy happy * fix stuff maybe? * fmt * trim packages * rate limit fix * more protoc huh * this makes no sense, why linux why * can it install literally just curl * windows in ci is slow, and all the newer things will not work there. disable the daemon feature and it will build * add daemon feature * maybe this * ok wut where is protoc * try setting protoc * hm * try copying protoc * remove optional * add cross config * idk nix * does nix want this? * some random pkg I found does this * uh oh * hack, be gone! * update contributing --- .github/workflows/release.yaml | 5 +++ .github/workflows/rust.yml | 86 ++++++++++++++++-------------------------- 2 files changed, 37 insertions(+), 54 deletions(-) (limited to '.github/workflows') diff --git a/.github/workflows/release.yaml b/.github/workflows/release.yaml index 13f0bfae..2522cf81 100644 --- a/.github/workflows/release.yaml +++ b/.github/workflows/release.yaml @@ -74,6 +74,11 @@ jobs: override: true profile: minimal # minimal component installation (ie, no documentation) + - name: Install Protoc + uses: arduino/setup-protoc@v3 + with: + repo-token: ${{ secrets.GITHUB_TOKEN }} + - name: Show version information (Rust, cargo, GCC) shell: bash run: | diff --git a/.github/workflows/rust.yml b/.github/workflows/rust.yml index a824891e..6e734c99 100644 --- a/.github/workflows/rust.yml +++ b/.github/workflows/rust.yml @@ -13,7 +13,7 @@ jobs: build: strategy: matrix: - os: [ubuntu-latest, macos-14, windows-latest] + os: [ubuntu-latest, macos-14] runs-on: ${{ matrix.os }} steps: @@ -24,6 +24,11 @@ jobs: with: toolchain: stable + - name: Install Protoc + uses: arduino/setup-protoc@v3 + with: + repo-token: ${{ secrets.GITHUB_TOKEN }} + - uses: actions/cache@v3 with: path: | @@ -32,19 +37,6 @@ jobs: target key: ${{ runner.os }}-cargo-release-${{ hashFiles('**/Cargo.lock') }} - - name: Install dependencies - if: matrix.os != 'macos-14' && matrix.os != 'windows-latest' - run: | - sudo apt update - sudo apt install libwebkit2gtk-4.1-dev \ - build-essential \ - curl \ - wget \ - file \ - libssl-dev \ - libayatana-appindicator3-dev \ - librsvg2-dev - - name: Run cargo build common run: cargo build -p atuin-common --locked --release @@ -65,7 +57,6 @@ jobs: # warning: libelf.so.2, needed by <...>/libkvm.so, not found (try using -rpath or -rpath-link) target: [x86_64-unknown-illumos] runs-on: ubuntu-latest - steps: - uses: actions/checkout@v3 @@ -74,6 +65,11 @@ jobs: with: tool: cross + - name: Install Protoc + uses: arduino/setup-protoc@v3 + with: + repo-token: ${{ secrets.GITHUB_TOKEN }} + - uses: actions/cache@v3 with: path: | @@ -92,12 +88,13 @@ jobs: run: cross build -p atuin-server --locked --target ${{ matrix.target }} - name: Run cross build main - run: cross build --all --locked --target ${{ matrix.target }} + run: | + cross build --all --locked --target ${{ matrix.target }} unit-test: strategy: matrix: - os: [ubuntu-latest, macos-14, windows-latest] + os: [ubuntu-latest, macos-14] runs-on: ${{ matrix.os }} steps: @@ -108,18 +105,10 @@ jobs: with: toolchain: stable - - name: Install dependencies - if: matrix.os != 'macos-14' && matrix.os != 'windows-latest' - run: | - sudo apt update - sudo apt install libwebkit2gtk-4.1-dev \ - build-essential \ - curl \ - wget \ - file \ - libssl-dev \ - libayatana-appindicator3-dev \ - librsvg2-dev + - name: Install Protoc + uses: arduino/setup-protoc@v3 + with: + repo-token: ${{ secrets.GITHUB_TOKEN }} - uses: taiki-e/install-action@v2 name: Install nextest @@ -140,7 +129,7 @@ jobs: check: strategy: matrix: - os: [ubuntu-latest, macos-14, windows-latest] + os: [ubuntu-latest, macos-14] runs-on: ${{ matrix.os }} steps: @@ -151,18 +140,10 @@ jobs: with: toolchain: stable - - name: Install dependencies - if: matrix.os != 'macos-14' && matrix.os != 'windows-latest' - run: | - sudo apt update - sudo apt install libwebkit2gtk-4.1-dev \ - build-essential \ - curl \ - wget \ - file \ - libssl-dev \ - libayatana-appindicator3-dev \ - librsvg2-dev + - name: Install Protoc + uses: arduino/setup-protoc@v3 + with: + repo-token: ${{ secrets.GITHUB_TOKEN }} - uses: actions/cache@v3 with: @@ -208,6 +189,11 @@ jobs: with: toolchain: stable + - name: Install Protoc + uses: arduino/setup-protoc@v3 + with: + repo-token: ${{ secrets.GITHUB_TOKEN }} + - uses: taiki-e/install-action@v2 name: Install nextest with: @@ -238,18 +224,10 @@ jobs: toolchain: stable components: clippy - - name: Install dependencies - if: matrix.os != 'macos-14' && matrix.os != 'windows-latest' - run: | - sudo apt update - sudo apt install libwebkit2gtk-4.1-dev \ - build-essential \ - curl \ - wget \ - file \ - libssl-dev \ - libayatana-appindicator3-dev \ - librsvg2-dev + - name: Install Protoc + uses: arduino/setup-protoc@v3 + with: + repo-token: ${{ secrets.GITHUB_TOKEN }} - uses: actions/cache@v3 with: -- cgit v1.3.1