Skip to content

test cache

test cache #101

Workflow file for this run

name: Build Service

Check failure on line 1 in .github/workflows/buildService.yml

View workflow run for this annotation

GitHub Actions / .github/workflows/buildService.yml

Invalid workflow file

(Line: 92, Col: 5): 'name' is already defined, (Line: 93, Col: 5): 'runs-on' is already defined, (Line: 94, Col: 5): 'steps' is already defined, (Line: 184, Col: 5): 'name' is already defined, (Line: 185, Col: 5): 'runs-on' is already defined, (Line: 186, Col: 5): 'needs' is already defined, (Line: 187, Col: 5): 'steps' is already defined
on:
workflow_dispatch:
pull_request:
paths-ignore: ['*.md']
branches: ['main', 'master', 'update/040']
push:
paths-ignore: ['*.md']
branches: ['main', 'master', 'update/040']
jobs:
Build_aarch64:
name: Build S9PK (aarch64)
runs-on: ubuntu-24.04-arm
steps:
- name: Prepare StartOS SDK
uses: k0gen/sdk@v3-optimization
- name: Checkout services repository
uses: actions/checkout@v4
with:
submodules: recursive
- name: Build aarch64 package
id: build
shell: bash
run: |
start-cli init
chmod 600 ~/.startos/developer.key.pem
RUST_LOG=debug RUST_BACKTRACE=1 make aarch64
PACKAGE_FILE=$(ls *_aarch64.s9pk 2>/dev/null | head -n1)
if [ -z "$PACKAGE_FILE" ]; then
echo "❌ No aarch64 package found!"
ls -la *.s9pk || echo "No .s9pk files found"
exit 1
fi
PACKAGE_ID=$(start-cli s9pk inspect "$PACKAGE_FILE" manifest | jq -r '.id')
echo "package_id=${PACKAGE_ID}" >> $GITHUB_ENV
echo "package_file=${PACKAGE_FILE}" >> $GITHUB_ENV
printf "\n aarch64 SHA256: $(sha256sum "${PACKAGE_FILE}") \n"
- name: Upload aarch64 .s9pk
uses: actions/upload-artifact@v4
with:
name: ${{ env.package_file }}
path: ./${{ env.package_file }}
Build_x86_64:
name: Build S9PK (x86_64)
runs-on: ubuntu-24.04
steps:
- name: Checkout services repository
uses: actions/checkout@v4
with:
submodules: recursive
- name: Cache StartOS SDK
id: sdk-cache
uses: actions/cache@v4
with:
path: |
~/.local/share/startos
~/.cache/startos
~/.local/bin/start-cli
key: ${{ runner.os }}-${{ runner.arch }}-k0gen-sdk-v3-${{ hashFiles('**/manifest.y*ml', '**/Makefile') }}
restore-keys: |
${{ runner.os }}-${{ runner.arch }}-k0gen-sdk-v3-
- name: Prepare StartOS SDK
if: steps.sdk-cache.outputs.cache-hit != 'true'
uses: k0gen/sdk@v3-optimization
- name: Build x86_64 package
id: build
shell: bash
run: |
start-cli init
chmod 600 ~/.startos/developer.key.pem
RUST_LOG=debug RUST_BACKTRACE=1 make x86
PACKAGE_FILE=$(ls *_x86_64.s9pk 2>/dev/null | head -n1)
if [ -z "$PACKAGE_FILE" ]; then
echo "❌ No x86_64 package found!"
ls -la *.s9pk || echo "No .s9pk files found"
exit 1
fi
PACKAGE_ID=$(start-cli s9pk inspect "$PACKAGE_FILE" manifest | jq -r '.id')
echo "package_id=${PACKAGE_ID}" >> $GITHUB_ENV
echo "package_file=${PACKAGE_FILE}" >> $GITHUB_ENV
printf "\n x86_64 SHA256: $(sha256sum "${PACKAGE_FILE}") \n"
name: Build S9PK (x86_64)
runs-on: ubuntu-24.04
steps:
- name: Checkout services repository
uses: actions/checkout@v4
with:
submodules: recursive
- name: Cache StartOS SDK
id: sdk-cache
uses: actions/cache@v4
with:
path: |
~/.cache/startos
~/.local/share/startos
~/.local/bin/start-cli
key: ${{ runner.os }}-${{ runner.arch }}-k0gen-sdk-v3-optimization-${{ hashFiles('**/manifest.y*ml', '**/Makefile') }}
restore-keys: |
${{ runner.os }}-${{ runner.arch }}-k0gen-sdk-v3-optimization-
- name: Prepare StartOS SDK
if: steps.sdk-cache.outputs.cache-hit != 'true'
uses: k0gen/sdk@v3-optimization
- name: Build x86_64 package
id: build
shell: bash
run: |
start-cli init
chmod 600 ~/.startos/developer.key.pem
RUST_LOG=debug RUST_BACKTRACE=1 make x86
PACKAGE_FILE=$(ls *_x86_64.s9pk 2>/dev/null | head -n1)
if [ -z "$PACKAGE_FILE" ]; then
echo "❌ No x86_64 package found!"
ls -la *.s9pk || echo "No .s9pk files found"
exit 1
fi
PACKAGE_ID=$(start-cli s9pk inspect "$PACKAGE_FILE" manifest | jq -r '.id')
echo "package_id=${PACKAGE_ID}" >> $GITHUB_ENV
echo "package_file=${PACKAGE_FILE}" >> $GITHUB_ENV
printf "\n x86_64 SHA256: $(sha256sum "${PACKAGE_FILE}") \n"
BuildUniversal:
name: Build S9PK (Universal)
runs-on: ubuntu-24.04
needs: [Build_aarch64, Build_x86_64]
steps:
- name: Checkout services repository
uses: actions/checkout@v4
with:
submodules: recursive
- name: Cache StartOS SDK
id: sdk-cache
uses: actions/cache@v4
with:
path: |
~/.local/share/startos
~/.cache/startos
~/.local/bin/start-cli
key: ${{ runner.os }}-${{ runner.arch }}-k0gen-sdk-v3-${{ hashFiles('**/manifest.y*ml', '**/Makefile') }}
restore-keys: |
${{ runner.os }}-${{ runner.arch }}-k0gen-sdk-v3-
- name: Prepare StartOS SDK
if: steps.sdk-cache.outputs.cache-hit != 'true'
uses: k0gen/sdk@v3-optimization
- name: Build Universal package
id: build
shell: bash
run: |
start-cli init
chmod 600 ~/.startos/developer.key.pem
RUST_LOG=debug RUST_BACKTRACE=1 make
PACKAGE_FILE=$(ls *.s9pk 2>/dev/null | grep -Ev '_(aarch64|x86_64)\.s9pk$' | head -n1)
if [ -z "$PACKAGE_FILE" ]; then
PACKAGE_FILE=$(ls *.s9pk 2>/dev/null | head -n1)
fi
if [ -z "$PACKAGE_FILE" ]; then
echo "❌ No universal package found!"
ls -la *.s9pk || echo "No .s9pk files found"
exit 1
fi
PACKAGE_ID=$(start-cli s9pk inspect "$PACKAGE_FILE" manifest | jq -r '.id')
echo "package_id=${PACKAGE_ID}" >> $GITHUB_ENV
echo "package_file=${PACKAGE_FILE}" >> $GITHUB_ENV
printf "\n ⚡ Universal SHA256: $(sha256sum "${PACKAGE_FILE}") \n"
name: Build S9PK (Universal)
runs-on: ubuntu-24.04
needs: [Build_aarch64, Build_x86_64]
steps:
- name: Checkout services repository
uses: actions/checkout@v4
with:
submodules: recursive
- name: Cache StartOS SDK
id: sdk-cache
uses: actions/cache@v4
with:
path: |
~/.cache/startos
~/.local/share/startos
~/.local/bin/start-cli
key: ${{ runner.os }}-${{ runner.arch }}-k0gen-sdk-v3-optimization-${{ hashFiles('**/manifest.y*ml', '**/Makefile') }}
restore-keys: |
${{ runner.os }}-${{ runner.arch }}-k0gen-sdk-v3-optimization-
- name: Prepare StartOS SDK
if: steps.sdk-cache.outputs.cache-hit != 'true'
uses: k0gen/sdk@v3-optimization
- name: Build Universal package
id: build
shell: bash
run: |
start-cli init
chmod 600 ~/.startos/developer.key.pem
RUST_LOG=debug RUST_BACKTRACE=1 make
PACKAGE_FILE=$(ls *.s9pk 2>/dev/null | grep -Ev '_(aarch64|x86_64)\.s9pk$' | head -n1)
if [ -z "$PACKAGE_FILE" ]; then
PACKAGE_FILE=$(ls *.s9pk 2>/dev/null | head -n1)
fi
if [ -z "$PACKAGE_FILE" ]; then
echo "❌ No universal package found!"
ls -la *.s9pk || echo "No .s9pk files found"
exit 1
fi
PACKAGE_ID=$(start-cli s9pk inspect "$PACKAGE_FILE" manifest | jq -r '.id')
echo "package_id=${PACKAGE_ID}" >> $GITHUB_ENV
echo "package_file=${PACKAGE_FILE}" >> $GITHUB_ENV
printf "\n ⚡ Universal SHA256: $(sha256sum "${PACKAGE_FILE}") \n"