Skip to content

chore(deps)(deps): bump pulldown-cmark from 0.12.2 to 0.13.1 #17

chore(deps)(deps): bump pulldown-cmark from 0.12.2 to 0.13.1

chore(deps)(deps): bump pulldown-cmark from 0.12.2 to 0.13.1 #17

name: Earthly CI/CD
on:
push:
branches: [main, CI_migration]
tags:
- "*.*.*"
pull_request:
types: [opened, synchronize, reopened]
workflow_dispatch:
env:
EARTHLY_TOKEN: ${{ secrets.EARTHLY_TOKEN }}
EARTHLY_ORG: ${{ vars.EARTHLY_ORG }}
EARTHLY_SATELLITE: ${{ vars.EARTHLY_SATELLITE }}
concurrency:
group: earthly-${{ github.ref }}
cancel-in-progress: true
jobs:
setup:
runs-on: [self-hosted, linux, x64]
outputs:
should-build: ${{ steps.changes.outputs.should-build }}
steps:
- name: Checkout code
uses: actions/checkout@v5
with:
fetch-depth: 0
- name: Check for relevant changes
id: changes
run: |
# Always build on main, tags, or manual dispatch
if [[ "${{ github.ref }}" == "refs/heads/main" ]] || [[ "${{ github.ref }}" == refs/tags/* ]] || [[ "${{ github.event_name }}" == "workflow_dispatch" ]]; then
echo "should-build=true" >> $GITHUB_OUTPUT
exit 0
fi
# For PRs, check if relevant files changed
if git diff --name-only HEAD~1 | grep -E "(\.rs$|Cargo\.|Earthfile|desktop/)" > /dev/null; then
echo "should-build=true" >> $GITHUB_OUTPUT
else
echo "should-build=false" >> $GITHUB_OUTPUT
fi
lint-and-format:
needs: setup
if: needs.setup.outputs.should-build == 'true'
runs-on: [self-hosted, linux, x64]
steps:
- name: Checkout code
uses: actions/checkout@v5
- name: Download Earthly
run: sudo /bin/sh -c 'wget https://github.com/earthly/earthly/releases/latest/download/earthly-linux-amd64 -O /usr/local/bin/earthly && chmod +x /usr/local/bin/earthly'
- name: Run Earthly lint and format
run: |
earthly --ci +fmt
earthly --ci +lint
build-frontend:
needs: setup
if: needs.setup.outputs.should-build == 'true'
runs-on: [self-hosted, linux, x64]
steps:
- name: Checkout code
uses: actions/checkout@v5
- name: Download Earthly
run: sudo /bin/sh -c 'wget https://github.com/earthly/earthly/releases/latest/download/earthly-linux-amd64 -O /usr/local/bin/earthly && chmod +x /usr/local/bin/earthly'
- name: Build frontend with Earthly
run: earthly --ci ./desktop+build
- name: Upload frontend artifacts
uses: actions/upload-artifact@v5
with:
name: frontend-dist
path: desktop/dist
retention-days: 30
build-native:
needs: [setup, lint-and-format, build-frontend]
if: needs.setup.outputs.should-build == 'true'
runs-on: [self-hosted, linux, x64]
steps:
- name: Checkout code
uses: actions/checkout@v5
- name: Download Earthly
run: sudo /bin/sh -c 'wget https://github.com/earthly/earthly/releases/latest/download/earthly-linux-amd64 -O /usr/local/bin/earthly && chmod +x /usr/local/bin/earthly'
- name: Build native binaries
run: |
earthly --ci +build-native
earthly --ci +build-debug-native
- name: Upload native binaries
uses: actions/upload-artifact@v5
with:
name: native-binaries
path: artifact/bin/
retention-days: 30
test:
needs: [setup, build-native]
if: needs.setup.outputs.should-build == 'true'
runs-on: [self-hosted, linux, x64]
steps:
- name: Checkout code
uses: actions/checkout@v5
- name: Download Earthly
run: sudo /bin/sh -c 'wget https://github.com/earthly/earthly/releases/latest/download/earthly-linux-amd64 -O /usr/local/bin/earthly && chmod +x /usr/local/bin/earthly'
- name: Run tests
run: earthly --ci +test
# Optional cross-compilation job (only for releases)
build-cross:
needs: [setup, build-native]
if: needs.setup.outputs.should-build == 'true' && (github.ref == 'refs/heads/main' || startsWith(github.ref, 'refs/tags/'))
runs-on: [self-hosted, linux, x64]
strategy:
fail-fast: false
matrix:
target:
- x86_64-unknown-linux-musl
# Add other targets as they become stable
steps:
- name: Checkout code
uses: actions/checkout@v5
- name: Download Earthly
run: sudo /bin/sh -c 'wget https://github.com/earthly/earthly/releases/latest/download/earthly-linux-amd64 -O /usr/local/bin/earthly && chmod +x /usr/local/bin/earthly'
- name: Build cross-compiled binaries
run: earthly --ci +cross-build --TARGET=${{ matrix.target }}
continue-on-error: true # Allow cross-compilation failures for now
- name: Upload cross-compiled binaries
if: success()
uses: actions/upload-artifact@v5
with:
name: cross-binaries-${{ matrix.target }}
path: artifact/bin/
retention-days: 30
# Summary job for status checks
earthly-success:
needs: [lint-and-format, build-frontend, build-native, test]
if: always()
runs-on: [self-hosted, linux, x64]
steps:
- name: Check all jobs succeeded
if: contains(needs.*.result, 'failure') || contains(needs.*.result, 'cancelled')
run: exit 1
- name: All jobs succeeded
run: echo "✅ All Earthly CI jobs completed successfully"