From b04edc0bc60cdcefa5b8aef09f327ba44a6dedaf Mon Sep 17 00:00:00 2001 From: Philippe Assis Date: Sun, 16 Nov 2025 18:56:22 -0300 Subject: [PATCH 01/13] =?UTF-8?q?feat:=20adicionar=20suporte=20a=20extens?= =?UTF-8?q?=C3=B5es=20de=20m=C3=B3dulo=20para=20macOS=20e=20Ubuntu=20no=20?= =?UTF-8?q?workflow=20de=20build?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/workflows/build-packages.yml | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/.github/workflows/build-packages.yml b/.github/workflows/build-packages.yml index 8a7e0ef..a510d64 100644 --- a/.github/workflows/build-packages.yml +++ b/.github/workflows/build-packages.yml @@ -29,21 +29,25 @@ jobs: name: "macos-latest", os_suffix: "-darwin-aarch64", target: "aarch64-apple-darwin", + module_extension: "dylib" } - { name: "ubuntu-latest", os_suffix: "-linux-amd64", target: "x86_64-unknown-linux-gnu", + module_extension: "so" } - { name: "ubuntu-latest", os_suffix: "-linux-aarch64", target: "aarch64-unknown-linux-gnu", + module_extension: "so" } runs-on: ${{ matrix.arch.name }} env: OS_SUFFIX: ${{ matrix.arch.os_suffix }} TARGET: ${{ matrix.arch.target }} + MODULE_EXTENSION: ${{ matrix.arch.module_extension }} steps: - name: Checkout repository uses: actions/checkout@v4 From 1a6f309245faa154e43cdee8d2c80d92272cbc4f Mon Sep 17 00:00:00 2001 From: Philippe Assis Date: Sun, 16 Nov 2025 18:56:37 -0300 Subject: [PATCH 02/13] =?UTF-8?q?feat:=20adicionar=20v=C3=ADrgulas=20ausen?= =?UTF-8?q?tes=20nas=20extens=C3=B5es=20de=20m=C3=B3dulo=20para=20macOS=20?= =?UTF-8?q?e=20Ubuntu=20no=20workflow=20de=20build?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/workflows/build-packages.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/build-packages.yml b/.github/workflows/build-packages.yml index a510d64..2dc6ff9 100644 --- a/.github/workflows/build-packages.yml +++ b/.github/workflows/build-packages.yml @@ -29,19 +29,19 @@ jobs: name: "macos-latest", os_suffix: "-darwin-aarch64", target: "aarch64-apple-darwin", - module_extension: "dylib" + module_extension: "dylib", } - { name: "ubuntu-latest", os_suffix: "-linux-amd64", target: "x86_64-unknown-linux-gnu", - module_extension: "so" + module_extension: "so", } - { name: "ubuntu-latest", os_suffix: "-linux-aarch64", target: "aarch64-unknown-linux-gnu", - module_extension: "so" + module_extension: "so", } runs-on: ${{ matrix.arch.name }} env: From 846038895e5c50ebe0c676ff09310c2cf98b096c Mon Sep 17 00:00:00 2001 From: Philippe Assis Date: Sun, 16 Nov 2025 18:59:41 -0300 Subject: [PATCH 03/13] =?UTF-8?q?feat:=20adicionar=20instala=C3=A7=C3=A3o?= =?UTF-8?q?=20do=20cross=20no=20workflow=20de=20build?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/workflows/build-packages.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.github/workflows/build-packages.yml b/.github/workflows/build-packages.yml index 2dc6ff9..9c9e630 100644 --- a/.github/workflows/build-packages.yml +++ b/.github/workflows/build-packages.yml @@ -53,6 +53,8 @@ jobs: uses: actions/checkout@v4 - name: Make scripts executable run: chmod +x ./scripts/*.sh + - name: Install cross + run: cargo install cross --force - name: Build module run: ./scripts/packages.sh --single "modules/${{ matrix.module }}" - name: Upload package artifact From 358068f0d4492d920361369de017e10dbe9eabad Mon Sep 17 00:00:00 2001 From: Philippe Assis Date: Sun, 16 Nov 2025 19:18:10 -0300 Subject: [PATCH 04/13] =?UTF-8?q?feat:=20corrigir=20caminho=20de=20movimen?= =?UTF-8?q?ta=C3=A7=C3=A3o=20do=20arquivo=20empacotado=20no=20script=20de?= =?UTF-8?q?=20empacotamento?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- scripts/packages.sh | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/scripts/packages.sh b/scripts/packages.sh index 52ce36f..9180c11 100755 --- a/scripts/packages.sh +++ b/scripts/packages.sh @@ -111,8 +111,9 @@ package_module() { cd - > /dev/null # Renomeia com OS_SUFFIX + RENAMED_ARCHIVE="${NAME}-${VERSION}${OS_SUFFIX}.tar.gz" - mv "$MODULE_DIR/$ARCHIVE_NAME" "./packages/$RENAMED_ARCHIVE" + mv "$ARCHIVE_NAME" "../packages/$RENAMED_ARCHIVE" echo "✅ Module packaged: $RENAMED_ARCHIVE" } From 736a1e60d28469752dd9eb83b78d8446821113ec Mon Sep 17 00:00:00 2001 From: Philippe Assis Date: Sun, 16 Nov 2025 19:27:36 -0300 Subject: [PATCH 05/13] =?UTF-8?q?feat:=20ajustar=20l=C3=B3gica=20de=20reno?= =?UTF-8?q?mea=C3=A7=C3=A3o=20do=20arquivo=20empacotado=20no=20script=20de?= =?UTF-8?q?=20empacotamento?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- scripts/packages.sh | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/scripts/packages.sh b/scripts/packages.sh index 9180c11..6ead38f 100755 --- a/scripts/packages.sh +++ b/scripts/packages.sh @@ -108,13 +108,12 @@ package_module() { rm -rf "$TMP_DIR" - cd - > /dev/null - - # Renomeia com OS_SUFFIX - + # Renomeia com OS_SUFFIX antes de sair do diretório RENAMED_ARCHIVE="${NAME}-${VERSION}${OS_SUFFIX}.tar.gz" mv "$ARCHIVE_NAME" "../packages/$RENAMED_ARCHIVE" + cd - > /dev/null + echo "✅ Module packaged: $RENAMED_ARCHIVE" } @@ -133,7 +132,7 @@ fi # MODO PRINCIPAL: prepara ambiente e dispara empacotamento em paralelo # ------------------------------------------------------------ -cargo install cross || true +# cargo install cross || true # Detect operating system or target # Define OS_SUFFIX, TARGET e MODULE_EXTENSION dinamicamente From b3e419f3b4d461fa3d0c49c83dd0c3852fc6f295 Mon Sep 17 00:00:00 2001 From: Philippe Assis Date: Sun, 16 Nov 2025 19:28:39 -0300 Subject: [PATCH 06/13] =?UTF-8?q?feat:=20adicionar=20diagn=C3=B3stico=20pa?= =?UTF-8?q?ra=20listar=20arquivos=20antes=20da=20renomea=C3=A7=C3=A3o=20do?= =?UTF-8?q?=20arquivo=20empacotado?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- scripts/packages.sh | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/scripts/packages.sh b/scripts/packages.sh index 6ead38f..3c87e24 100755 --- a/scripts/packages.sh +++ b/scripts/packages.sh @@ -106,8 +106,13 @@ package_module() { echo "📦 Creating archive: $ARCHIVE_NAME" tar -czf "$ARCHIVE_NAME" -C "$TMP_DIR" . + rm -rf "$TMP_DIR" + # Diagnóstico: listar arquivos antes do mv + echo "🔍 Diagnostic: ls -l ." + ls -l . + # Renomeia com OS_SUFFIX antes de sair do diretório RENAMED_ARCHIVE="${NAME}-${VERSION}${OS_SUFFIX}.tar.gz" mv "$ARCHIVE_NAME" "../packages/$RENAMED_ARCHIVE" From db70d6089ee6eba9234c95a304b1f0df178a22c3 Mon Sep 17 00:00:00 2001 From: Philippe Assis Date: Sun, 16 Nov 2025 19:38:35 -0300 Subject: [PATCH 07/13] =?UTF-8?q?feat:=20adicionar=20diagn=C3=B3stico=20de?= =?UTF-8?q?=20diret=C3=B3rio=20atual=20no=20script=20de=20empacotamento?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/workflows/build-packages.yml | 86 ++++++++++++++++++++-------- scripts/packages.sh | 1 + 2 files changed, 62 insertions(+), 25 deletions(-) diff --git a/.github/workflows/build-packages.yml b/.github/workflows/build-packages.yml index 9c9e630..4e01964 100644 --- a/.github/workflows/build-packages.yml +++ b/.github/workflows/build-packages.yml @@ -19,35 +19,68 @@ jobs: run: | echo "modules=$(ls -d modules/* | xargs -n1 basename | jq -R -s -c 'split("\n")[:-1]')" >> $GITHUB_OUTPUT - build: + build-macos: needs: discover_modules + runs-on: macos-latest strategy: matrix: module: ${{ fromJson(needs.discover_modules.outputs.modules) }} - arch: - - { - name: "macos-latest", - os_suffix: "-darwin-aarch64", - target: "aarch64-apple-darwin", - module_extension: "dylib", - } - - { - name: "ubuntu-latest", - os_suffix: "-linux-amd64", - target: "x86_64-unknown-linux-gnu", - module_extension: "so", - } - - { - name: "ubuntu-latest", - os_suffix: "-linux-aarch64", - target: "aarch64-unknown-linux-gnu", - module_extension: "so", - } - runs-on: ${{ matrix.arch.name }} env: - OS_SUFFIX: ${{ matrix.arch.os_suffix }} - TARGET: ${{ matrix.arch.target }} - MODULE_EXTENSION: ${{ matrix.arch.module_extension }} + OS_SUFFIX: -darwin-aarch64 + TARGET: aarch64-apple-darwin + MODULE_EXTENSION: dylib + steps: + - name: Checkout repository + uses: actions/checkout@v4 + - name: Make scripts executable + run: chmod +x ./scripts/*.sh + - name: Install cross + run: cargo install cross --force + - name: Build module + run: ./scripts/packages.sh --single "modules/${{ matrix.module }}" + - name: Upload package artifact + uses: actions/upload-artifact@v4 + with: + name: ${{ matrix.module }}${{ env.OS_SUFFIX }} + path: packages/*.tar.gz + retention-days: 1 + + build-linux-amd64: + needs: discover_modules + runs-on: ubuntu-latest + strategy: + matrix: + module: ${{ fromJson(needs.discover_modules.outputs.modules) }} + env: + OS_SUFFIX: -linux-amd64 + TARGET: x86_64-unknown-linux-gnu + MODULE_EXTENSION: so + steps: + - name: Checkout repository + uses: actions/checkout@v4 + - name: Make scripts executable + run: chmod +x ./scripts/*.sh + - name: Install cross + run: cargo install cross --force + - name: Build module + run: ./scripts/packages.sh --single "modules/${{ matrix.module }}" + - name: Upload package artifact + uses: actions/upload-artifact@v4 + with: + name: ${{ matrix.module }}${{ env.OS_SUFFIX }} + path: packages/*.tar.gz + retention-days: 1 + + build-linux-aarch64: + needs: discover_modules + runs-on: ubuntu-latest + strategy: + matrix: + module: ${{ fromJson(needs.discover_modules.outputs.modules) }} + env: + OS_SUFFIX: -linux-aarch64 + TARGET: aarch64-unknown-linux-gnu + MODULE_EXTENSION: so steps: - name: Checkout repository uses: actions/checkout@v4 @@ -65,7 +98,10 @@ jobs: retention-days: 1 deploy: - needs: build + needs: + - build-macos + - build-linux-amd64 + - build-linux-aarch64 runs-on: ubuntu-latest steps: - name: Checkout repository diff --git a/scripts/packages.sh b/scripts/packages.sh index 3c87e24..fde6913 100755 --- a/scripts/packages.sh +++ b/scripts/packages.sh @@ -112,6 +112,7 @@ package_module() { # Diagnóstico: listar arquivos antes do mv echo "🔍 Diagnostic: ls -l ." ls -l . + echo "📂 Current directory: $(pwd)" # Renomeia com OS_SUFFIX antes de sair do diretório RENAMED_ARCHIVE="${NAME}-${VERSION}${OS_SUFFIX}.tar.gz" From 36fda03fc71128b8645284d496ebe7ff4bd5a4e7 Mon Sep 17 00:00:00 2001 From: Philippe Assis Date: Sun, 16 Nov 2025 19:45:15 -0300 Subject: [PATCH 08/13] =?UTF-8?q?feat:=20verificar=20e=20criar=20diret?= =?UTF-8?q?=C3=B3rio=20packages=20antes=20de=20mover=20o=20arquivo=20empac?= =?UTF-8?q?otado?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- scripts/packages.sh | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/scripts/packages.sh b/scripts/packages.sh index fde6913..278362d 100755 --- a/scripts/packages.sh +++ b/scripts/packages.sh @@ -116,7 +116,11 @@ package_module() { # Renomeia com OS_SUFFIX antes de sair do diretório RENAMED_ARCHIVE="${NAME}-${VERSION}${OS_SUFFIX}.tar.gz" - mv "$ARCHIVE_NAME" "../packages/$RENAMED_ARCHIVE" + # Verifica se ../../packages existe, se não existir cria + if [ ! -d "../../packages" ]; then + mkdir -p "../../packages" + fi + mv "$ARCHIVE_NAME" "../../packages/$RENAMED_ARCHIVE" cd - > /dev/null From ea178c5f98fbc36eec63acf30b227f5acdf120cf Mon Sep 17 00:00:00 2001 From: Philippe Assis Date: Sun, 16 Nov 2025 20:01:36 -0300 Subject: [PATCH 09/13] =?UTF-8?q?feat:=20corrigir=20caminho=20de=20c=C3=B3?= =?UTF-8?q?pia=20dos=20pacotes=20para=20o=20diret=C3=B3rio=20phlow-package?= =?UTF-8?q?s?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/workflows/build-packages.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/build-packages.yml b/.github/workflows/build-packages.yml index 4e01964..a9ab7fe 100644 --- a/.github/workflows/build-packages.yml +++ b/.github/workflows/build-packages.yml @@ -131,7 +131,7 @@ jobs: env: GH_TOKEN: ${{ secrets.GH_PAT }} run: | - cp -R packages/* phlow-packages/packages/ + cp -R raw/* phlow-packages/packages/ cd phlow-packages git checkout -b update-packages-${{ github.run_id }} git add . From 2e8976047819a183556516ca8dbd7a6f148c3f90 Mon Sep 17 00:00:00 2001 From: Philippe Assis Date: Sun, 16 Nov 2025 20:49:19 -0300 Subject: [PATCH 10/13] =?UTF-8?q?feat:=20adicionar=20etapas=20de=20instala?= =?UTF-8?q?=C3=A7=C3=A3o=20do=20Cargo=20e=20yq=20no=20workflow=20de=20buil?= =?UTF-8?q?d?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/workflows/asd.yaml | 166 +++++++++++++++++++++++++++ .github/workflows/build-packages.yml | 32 ++++++ scripts/packages.sh | 2 - 3 files changed, 198 insertions(+), 2 deletions(-) create mode 100644 .github/workflows/asd.yaml diff --git a/.github/workflows/asd.yaml b/.github/workflows/asd.yaml new file mode 100644 index 0000000..148a630 --- /dev/null +++ b/.github/workflows/asd.yaml @@ -0,0 +1,166 @@ +name: Build and Deploy Packages + +on: + workflow_dispatch: + +env: + CARGO_TERM_COLOR: always + PARALLEL: 2 + +permissions: + contents: write + actions: read + checks: read + +jobs: + build_darwin: + runs-on: macos-latest + env: + OS_SUFFIX: -darwin-aarch64 + TARGET: aarch64-apple-darwin + + steps: + - name: Checkout repository + uses: actions/checkout@v4 + with: + fetch-depth: 0 + + - name: Make scripts executable + run: chmod +x ./scripts/*.sh + + - name: Run packages script + run: ./scripts/packages.sh + + - name: Upload Mac packages + uses: actions/upload-artifact@v4 + with: + name: darwin-packages + path: ./packages + retention-days: 1 + + build_linux_amd64: + runs-on: ubuntu-latest + env: + OS_SUFFIX: -linux-amd64 + TARGET: x86_64-unknown-linux-gnu + + steps: + - name: Checkout repository + uses: actions/checkout@v4 + with: + fetch-depth: 0 + + - name: Set up Docker Buildx + uses: docker/setup-buildx-action@v3 + + - name: Make scripts executable + run: chmod +x ./scripts/*.sh + + - name: Run packages script + run: TARGET=x86_64-unknown-linux-gnu ./scripts/packages.sh + + - name: Upload Linux amd64 packages + uses: actions/upload-artifact@v4 + with: + name: linux-amd64-packages + path: ./packages + retention-days: 1 + + build_linux_aarch64: + runs-on: ubuntu-latest + env: + OS_SUFFIX: -linux-aarch64 + TARGET: aarch64-unknown-linux-gnu + + steps: + - name: Checkout repository + uses: actions/checkout@v4 + with: + fetch-depth: 0 + + - name: Set up Docker Buildx + uses: docker/setup-buildx-action@v3 + + - name: Make scripts executable + run: chmod +x ./scripts/*.sh + + - name: Run packages script + run: TARGET=aarch64-unknown-linux-gnu ./scripts/packages.sh + + - name: Upload Linux aarch64 packages + uses: actions/upload-artifact@v4 + with: + name: linux-aarch64-packages + path: ./packages + retention-days: 1 + + deploy: + needs: + - build_darwin + - build_linux_amd64 + - build_linux_aarch64 + runs-on: ubuntu-latest + steps: + - name: Checkout repository + uses: actions/checkout@v4 + with: + fetch-depth: 0 + + - name: Install dependencies + run: sudo apt-get update && sudo apt-get install -y jq + + - name: Make scripts executable + run: chmod +x ./scripts/*.sh + + - name: Create raw directory + run: mkdir -p raw + + - name: Download Mac packages + uses: actions/download-artifact@v4 + with: + name: darwin-packages + path: darwin-packages + + - name: Download Ubuntu packages + uses: actions/download-artifact@v4 + with: + name: linux-amd64-packages + path: linux-amd64-packages + + - name: Download Linux musl packages + uses: actions/download-artifact@v4 + with: + name: linux-aarch64-packages + path: linux-aarch64-packages + + - name: Move artifacts to raw directory + run: | + # cp darwin-packages/*.tar.gz raw/ || true + cp linux-amd64-packages/*.tar.gz raw/ || true + cp linux-aarch64-packages/*.tar.gz raw/ || true + + - name: Run resolver script + run: ./scripts/resolver-packages-dir.sh + + - name: Setup Git for packages repo + run: | + git config --global user.name "GitHub Actions Bot" + git config --global user.email "actions@github.com" + + - name: Clone packages repository + env: + TOKEN: ${{ secrets.PHLOW_PACKAGES_PAT }} + run: | + git clone https://x-access-token:${TOKEN}@github.com/phlowdotdev/phlow-packages.git + + - name: Update packages repository + env: + GH_TOKEN: ${{ secrets.GH_PAT }} # necessário para o `gh pr create` + run: | + cp -R packages/* phlow-packages/packages/ + cd phlow-packages + git checkout -b update-packages-${{ github.run_id }} + git add . + git commit -m "Update packages from workflow run ${{ github.run_id }}" || echo "No changes to commit" + git push --set-upstream origin update-packages-${{ github.run_id }} + gh pr create --title "Update packages from workflow run ${{ github.run_id }}" --body "Automated package update from workflow run." --base main --head update-packages-${{ github.run_id }} diff --git a/.github/workflows/build-packages.yml b/.github/workflows/build-packages.yml index a9ab7fe..bedd3c9 100644 --- a/.github/workflows/build-packages.yml +++ b/.github/workflows/build-packages.yml @@ -34,6 +34,13 @@ jobs: uses: actions/checkout@v4 - name: Make scripts executable run: chmod +x ./scripts/*.sh + - name: Cargo fetch + run: cargo fetch --locked + - name: Install yq (macOS) + run: | + curl -L https://github.com/mikefarah/yq/releases/latest/download/yq_darwin_arm64 -o yq + chmod +x yq + sudo mv yq /usr/local/bin/yq - name: Install cross run: cargo install cross --force - name: Build module @@ -60,6 +67,12 @@ jobs: uses: actions/checkout@v4 - name: Make scripts executable run: chmod +x ./scripts/*.sh + - name: Cargo fetch + run: cargo fetch --locked + - name: Install yq (Linux) + run: | + sudo curl -L https://github.com/mikefarah/yq/releases/latest/download/yq_linux_amd64 -o /usr/local/bin/yq + sudo chmod +x /usr/local/bin/yq - name: Install cross run: cargo install cross --force - name: Build module @@ -86,6 +99,12 @@ jobs: uses: actions/checkout@v4 - name: Make scripts executable run: chmod +x ./scripts/*.sh + - name: Cargo fetch + run: cargo fetch --locked + - name: Install yq (Linux) + run: | + sudo curl -L https://github.com/mikefarah/yq/releases/latest/download/yq_linux_amd64 -o /usr/local/bin/yq + sudo chmod +x /usr/local/bin/yq - name: Install cross run: cargo install cross --force - name: Build module @@ -106,8 +125,10 @@ jobs: steps: - name: Checkout repository uses: actions/checkout@v4 + - name: Install dependencies run: sudo apt-get update && sudo apt-get install -y jq + - name: Make scripts executable run: chmod +x ./scripts/*.sh - name: Create raw directory @@ -116,8 +137,19 @@ jobs: uses: actions/download-artifact@v4 with: path: raw + merge-multiple: true + - name: List downloaded tarballs + run: | + echo "🔍 Listing tarballs in raw (depth 2)" + find raw -maxdepth 2 -type f -name '*.tar.gz' -print -exec ls -lh {} \; || echo "Nenhum arquivo .tar.gz encontrado" - name: Run resolver script run: ./scripts/resolver-packages-dir.sh + - name: List resolved packages + run: | + echo "🔍 Listing resolved packages (*.tar.gz) under ./packages" + find packages -maxdepth 3 -type f -name '*.tar.gz' -print -exec ls -lh {} \; || echo "Nenhum .tar.gz encontrado em ./packages" + echo "📁 Preview of package directories" + find packages -maxdepth 3 -type d | sort | head -n 200 - name: Setup Git for packages repo run: | git config --global user.name "GitHub Actions Bot" diff --git a/scripts/packages.sh b/scripts/packages.sh index 278362d..5711d26 100755 --- a/scripts/packages.sh +++ b/scripts/packages.sh @@ -1,5 +1,3 @@ -echo "📦 Clean folder ./packages" -echo "🎉 All modules packaged successfully!" #!/usr/bin/env bash set -euo pipefail From 1c1c4f5d070445d7fc44c76ae2d5e10b360d5d54 Mon Sep 17 00:00:00 2001 From: Philippe Assis Date: Sun, 16 Nov 2025 20:54:27 -0300 Subject: [PATCH 11/13] =?UTF-8?q?feat:=20adicionar=20etapas=20de=20pr?= =?UTF-8?q?=C3=A9-busca=20e=20cache=20do=20registro=20do=20Cargo=20para=20?= =?UTF-8?q?Linux=20e=20macOS?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/workflows/build-packages.yml | 73 ++++++++++++++++++++++++---- 1 file changed, 64 insertions(+), 9 deletions(-) diff --git a/.github/workflows/build-packages.yml b/.github/workflows/build-packages.yml index bedd3c9..5395df5 100644 --- a/.github/workflows/build-packages.yml +++ b/.github/workflows/build-packages.yml @@ -19,8 +19,42 @@ jobs: run: | echo "modules=$(ls -d modules/* | xargs -n1 basename | jq -R -s -c 'split("\n")[:-1]')" >> $GITHUB_OUTPUT + prefetch-linux: + runs-on: ubuntu-latest + steps: + - name: Checkout repository + uses: actions/checkout@v4 + - name: Cache cargo registry (Linux) + uses: actions/cache@v4 + with: + path: | + ~/.cargo/registry + ~/.cargo/git + key: ${{ runner.os }}-cargo-registry-${{ hashFiles('**/Cargo.lock') }} + restore-keys: | + ${{ runner.os }}-cargo-registry- + - name: Cargo fetch (Linux) + run: cargo fetch --locked + + prefetch-macos: + runs-on: macos-latest + steps: + - name: Checkout repository + uses: actions/checkout@v4 + - name: Cache cargo registry (macOS) + uses: actions/cache@v4 + with: + path: | + ~/.cargo/registry + ~/.cargo/git + key: ${{ runner.os }}-cargo-registry-${{ hashFiles('**/Cargo.lock') }} + restore-keys: | + ${{ runner.os }}-cargo-registry- + - name: Cargo fetch (macOS) + run: cargo fetch --locked + build-macos: - needs: discover_modules + needs: [discover_modules, prefetch-macos] runs-on: macos-latest strategy: matrix: @@ -32,10 +66,17 @@ jobs: steps: - name: Checkout repository uses: actions/checkout@v4 + - name: Restore cargo registry cache (macOS) + uses: actions/cache@v4 + with: + path: | + ~/.cargo/registry + ~/.cargo/git + key: ${{ runner.os }}-cargo-registry-${{ hashFiles('**/Cargo.lock') }} + restore-keys: | + ${{ runner.os }}-cargo-registry- - name: Make scripts executable run: chmod +x ./scripts/*.sh - - name: Cargo fetch - run: cargo fetch --locked - name: Install yq (macOS) run: | curl -L https://github.com/mikefarah/yq/releases/latest/download/yq_darwin_arm64 -o yq @@ -53,7 +94,7 @@ jobs: retention-days: 1 build-linux-amd64: - needs: discover_modules + needs: [discover_modules, prefetch-linux] runs-on: ubuntu-latest strategy: matrix: @@ -65,10 +106,17 @@ jobs: steps: - name: Checkout repository uses: actions/checkout@v4 + - name: Restore cargo registry cache (Linux) + uses: actions/cache@v4 + with: + path: | + ~/.cargo/registry + ~/.cargo/git + key: ${{ runner.os }}-cargo-registry-${{ hashFiles('**/Cargo.lock') }} + restore-keys: | + ${{ runner.os }}-cargo-registry- - name: Make scripts executable run: chmod +x ./scripts/*.sh - - name: Cargo fetch - run: cargo fetch --locked - name: Install yq (Linux) run: | sudo curl -L https://github.com/mikefarah/yq/releases/latest/download/yq_linux_amd64 -o /usr/local/bin/yq @@ -85,7 +133,7 @@ jobs: retention-days: 1 build-linux-aarch64: - needs: discover_modules + needs: [discover_modules, prefetch-linux] runs-on: ubuntu-latest strategy: matrix: @@ -97,10 +145,17 @@ jobs: steps: - name: Checkout repository uses: actions/checkout@v4 + - name: Restore cargo registry cache (Linux) + uses: actions/cache@v4 + with: + path: | + ~/.cargo/registry + ~/.cargo/git + key: ${{ runner.os }}-cargo-registry-${{ hashFiles('**/Cargo.lock') }} + restore-keys: | + ${{ runner.os }}-cargo-registry- - name: Make scripts executable run: chmod +x ./scripts/*.sh - - name: Cargo fetch - run: cargo fetch --locked - name: Install yq (Linux) run: | sudo curl -L https://github.com/mikefarah/yq/releases/latest/download/yq_linux_amd64 -o /usr/local/bin/yq From d5a6701dc7553b1edfcca13336c1f2050f2091d7 Mon Sep 17 00:00:00 2001 From: Philippe Assis Date: Sun, 16 Nov 2025 20:56:53 -0300 Subject: [PATCH 12/13] feat: adicionar etapas de busca do Cargo para targets Linux amd64 e aarch64 --- .github/workflows/build-packages.yml | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/.github/workflows/build-packages.yml b/.github/workflows/build-packages.yml index 5395df5..e1a5d43 100644 --- a/.github/workflows/build-packages.yml +++ b/.github/workflows/build-packages.yml @@ -33,8 +33,12 @@ jobs: key: ${{ runner.os }}-cargo-registry-${{ hashFiles('**/Cargo.lock') }} restore-keys: | ${{ runner.os }}-cargo-registry- - - name: Cargo fetch (Linux) + - name: Cargo fetch (Linux host) run: cargo fetch --locked + - name: Cargo fetch (Linux amd64 target) + run: cargo fetch --locked --target x86_64-unknown-linux-gnu + - name: Cargo fetch (Linux aarch64 target) + run: cargo fetch --locked --target aarch64-unknown-linux-gnu prefetch-macos: runs-on: macos-latest From 818188e9868efe5d14e94a43f1734b3e64a47142 Mon Sep 17 00:00:00 2001 From: Philippe Assis Date: Sun, 16 Nov 2025 21:29:49 -0300 Subject: [PATCH 13/13] =?UTF-8?q?feat:=20corrigir=20caminho=20de=20c=C3=B3?= =?UTF-8?q?pia=20dos=20pacotes=20para=20o=20diret=C3=B3rio=20phlow-package?= =?UTF-8?q?s?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/workflows/build-packages.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/build-packages.yml b/.github/workflows/build-packages.yml index e1a5d43..422eebf 100644 --- a/.github/workflows/build-packages.yml +++ b/.github/workflows/build-packages.yml @@ -222,7 +222,7 @@ jobs: env: GH_TOKEN: ${{ secrets.GH_PAT }} run: | - cp -R raw/* phlow-packages/packages/ + cp -R packages/* phlow-packages/packages/ cd phlow-packages git checkout -b update-packages-${{ github.run_id }} git add .