diff --git a/.forgejo/workflows/build.nix b/.forgejo/workflows/build.nix deleted file mode 100644 index e29a1f1f..00000000 --- a/.forgejo/workflows/build.nix +++ /dev/null @@ -1,33 +0,0 @@ -{pkgs?import{}}:let - stdenv = pkgs.clang19Stdenv; - name = "tek"; - nativeBuildInputs = with pkgs; [ grcov time rustup cloc just pkg-config freetype libclang ]; - buildInputs = with pkgs; let - #suil = pkgs.enableDebugging (pkgs.suil.overrideAttrs (a: b: { - #dontStrip = true; separateDebugInfo = true; - #})); - in [ jack2 lilv serd libclang /*suil*/ glib gtk3 ]; - VST3_SDK_DIR = "/home/user/Lab/Music/tek/vst3sdk/"; - LIBCLANG_PATH = "${pkgs.libclang.lib.outPath}/lib"; - LD_LIBRARY_PATH = pkgs.lib.makeLibraryPath (with pkgs; [ - pipewire.jack - # for ChowKick.lv2: - freetype - libgcc.lib - # for Panagement - xorg.libX11 - xorg.libXcursor - xorg.libXi - libxkbcommon - #suil - # for Helm: - alsa-lib - curl - libglvnd - #xorg_sys_opengl - ]); -in pkgs.mkShell.override { - inherit stdenv; -} { - inherit name nativeBuildInputs buildInputs VST3_SDK_DIR LIBCLANG_PATH LD_LIBRARY_PATH; -} diff --git a/.forgejo/workflows/build.yaml b/.forgejo/workflows/build.yaml index 8e125e0a..419b34d9 100644 --- a/.forgejo/workflows/build.yaml +++ b/.forgejo/workflows/build.yaml @@ -1,12 +1,25 @@ on: [push] jobs: build: - container: - image: alpine:edge + container: { image: "alpine:edge" } steps: - - run: apk update - - run: apk add tree rustup git just cloc build-base clang20-dev pipewire-jack-dev lilv-dev serd-dev - - run: git clone --recursive $GITHUB_SERVER_URL/$GITHUB_REPOSITORY . + + - name: install deps + run: apk add --no-cache nodejs tree rustup git just cloc build-base clang20-dev pipewire-jack-dev lilv-dev serd-dev + + - id: cache + name: cache restore + uses: https://data.forgejo.org/actions/cache/restore@v4 + with: + key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }} + path: | + ~/.cargo/bin/ + ~/.cargo/registry/index/ + ~/.cargo/registry/cache/ + ~/.cargo/git/db/ + target/ + + - run: git clone --depth 1 --recursive $GITHUB_SERVER_URL/$GITHUB_REPOSITORY . - run: whoami && pwd && tree - run: cloc src/ && cloc . - run: rustup-init -y @@ -15,3 +28,14 @@ jobs: - run: source "$HOME/.cargo/env" && RUSTFLAGS="-Ctarget-feature=-crt-static" just test - run: source "$HOME/.cargo/env" && RUSTFLAGS="-Ctarget-feature=-crt-static" just build-release - run: tree + + - name: cache save + uses: https://data.forgejo.org/actions/cache/save@v4 + with: + key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }} + path: | + ~/.cargo/bin/ + ~/.cargo/registry/index/ + ~/.cargo/registry/cache/ + ~/.cargo/git/db/ + target/