mirror of
https://github.com/ivabus/pantry
synced 2024-11-26 18:25:08 +03:00
move aarch64 to hosted runners
This commit is contained in:
parent
d2ad4b5f7e
commit
5df7e65838
3 changed files with 49 additions and 25 deletions
71
.github/workflows/build.yml
vendored
71
.github/workflows/build.yml
vendored
|
@ -5,35 +5,25 @@ on:
|
||||||
projects:
|
projects:
|
||||||
required: true
|
required: true
|
||||||
type: string
|
type: string
|
||||||
ref:
|
|
||||||
required: true
|
|
||||||
type: string
|
|
||||||
|
|
||||||
env:
|
env:
|
||||||
TEA_SECRET: ${{ secrets.TEA_SECRET }}
|
TEA_SECRET: ${{ secrets.TEA_SECRET }}
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
queue-builder:
|
|
||||||
runs-on: ubuntu-latest
|
|
||||||
steps:
|
|
||||||
- name: queue
|
|
||||||
run: |
|
|
||||||
# Don't use GITHUB_SHA for PRs: https://github.com/orgs/community/discussions/25191
|
|
||||||
curl https://app.tea.xyz/api/builder/enqueue \
|
|
||||||
-H "authorization: bearer ${{ secrets.TEA_API_TOKEN }}" \
|
|
||||||
-d "${{inputs.ref}} ${{ inputs.projects }}"
|
|
||||||
|
|
||||||
build:
|
build:
|
||||||
runs-on: ${{ matrix.os }}
|
runs-on: ${{ matrix.os }}
|
||||||
strategy:
|
strategy:
|
||||||
matrix:
|
matrix:
|
||||||
include:
|
include:
|
||||||
- os: macos-11
|
- os: macos-11
|
||||||
container: ~
|
|
||||||
- os: ubuntu-latest
|
- os: ubuntu-latest
|
||||||
container:
|
container:
|
||||||
image: debian:buster-slim
|
image: debian:buster-slim
|
||||||
options: --memory=16g
|
options: --memory=16g
|
||||||
|
- os: [self-hosted, macOS, ARM64]
|
||||||
|
tag: darwin-aarch64
|
||||||
|
- os: [self-hosted, linux, ARM64]
|
||||||
|
tag: linux-aarch64
|
||||||
container: ${{ matrix.container }}
|
container: ${{ matrix.container }}
|
||||||
outputs:
|
outputs:
|
||||||
built: ${{ steps.build.outputs.pkgs }}
|
built: ${{ steps.build.outputs.pkgs }}
|
||||||
|
@ -52,6 +42,15 @@ jobs:
|
||||||
repository: teaxyz/cli
|
repository: teaxyz/cli
|
||||||
token: ${{ secrets.TEMP_JACOBS_GITHUB_PAT }}
|
token: ${{ secrets.TEMP_JACOBS_GITHUB_PAT }}
|
||||||
|
|
||||||
|
- run: |
|
||||||
|
if test -d $TEA_PREFIX/tea.xyz; then
|
||||||
|
find $TEA_PREFIX/tea.xyz -mindepth 1 -maxdepth 1 -not \( -path $TEA_PREFIX/tea.xyz/var \) -print0 | \
|
||||||
|
xargs -0 rm -rf
|
||||||
|
fi
|
||||||
|
if: ${{ matrix.tag }}
|
||||||
|
env:
|
||||||
|
TEA_PREFIX: /opt
|
||||||
|
|
||||||
- uses: teaxyz/setup@v0
|
- uses: teaxyz/setup@v0
|
||||||
id: tea
|
id: tea
|
||||||
with:
|
with:
|
||||||
|
@ -72,7 +71,9 @@ jobs:
|
||||||
for x in /usr/local/*; do sudo mv $x /tmp; done
|
for x in /usr/local/*; do sudo mv $x /tmp; done
|
||||||
;;
|
;;
|
||||||
*)
|
*)
|
||||||
exit 1
|
# self-hosted runner. noop
|
||||||
|
echo
|
||||||
|
;;
|
||||||
esac
|
esac
|
||||||
|
|
||||||
rm -rf /opt/tea.xyz/var
|
rm -rf /opt/tea.xyz/var
|
||||||
|
@ -84,7 +85,7 @@ jobs:
|
||||||
- run: cli/scripts/install.ts ${{ steps.sorted.outputs.pre-install }}
|
- run: cli/scripts/install.ts ${{ steps.sorted.outputs.pre-install }}
|
||||||
|
|
||||||
#FIXME remove later
|
#FIXME remove later
|
||||||
- run: find /opt -name bin -type d -exec find {} -type f \; | xargs chmod 777
|
- run: find /opt -name bin -exec find {} -type f \; | xargs chmod 777
|
||||||
|
|
||||||
- run: pantry/scripts/build.ts ${{ steps.sorted.outputs.pkgs }}
|
- run: pantry/scripts/build.ts ${{ steps.sorted.outputs.pkgs }}
|
||||||
id: build
|
id: build
|
||||||
|
@ -105,7 +106,7 @@ jobs:
|
||||||
- name: upload artifacts
|
- name: upload artifacts
|
||||||
uses: actions/upload-artifact@v3
|
uses: actions/upload-artifact@v3
|
||||||
with:
|
with:
|
||||||
name: ${{ matrix.os }}
|
name: ${{ matrix.tag || matrix.os }}
|
||||||
path: artifacts.tgz
|
path: artifacts.tgz
|
||||||
if-no-files-found: error
|
if-no-files-found: error
|
||||||
|
|
||||||
|
@ -124,6 +125,10 @@ jobs:
|
||||||
container: ghcr.io/teaxyz/infuser:slim-latest
|
container: ghcr.io/teaxyz/infuser:slim-latest
|
||||||
- os: ubuntu-latest
|
- os: ubuntu-latest
|
||||||
container: debian:buster-slim
|
container: debian:buster-slim
|
||||||
|
- os: [self-hosted, macOS, ARM64]
|
||||||
|
tag: darwin-aarch64
|
||||||
|
- os: [self-hosted, linux, ARM64]
|
||||||
|
tag: linux-aarch64
|
||||||
container: ${{ matrix.container }}
|
container: ${{ matrix.container }}
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v3
|
- uses: actions/checkout@v3
|
||||||
|
@ -141,6 +146,15 @@ jobs:
|
||||||
apt-get --yes install libc-dev libstdc++-8-dev libgcc-8-dev
|
apt-get --yes install libc-dev libstdc++-8-dev libgcc-8-dev
|
||||||
if: ${{ matrix.container != '' }}
|
if: ${{ matrix.container != '' }}
|
||||||
|
|
||||||
|
- run: |
|
||||||
|
if test -d $TEA_PREFIX/tea.xyz; then
|
||||||
|
find $TEA_PREFIX/tea.xyz -mindepth 1 -maxdepth 1 -not \( -path $TEA_PREFIX/tea.xyz/var \) -print0 | \
|
||||||
|
xargs -0 rm -rf
|
||||||
|
fi
|
||||||
|
if: ${{ matrix.tag }}
|
||||||
|
env:
|
||||||
|
TEA_PREFIX: ${{ github.workspace }}
|
||||||
|
|
||||||
- uses: teaxyz/setup@v0
|
- uses: teaxyz/setup@v0
|
||||||
id: tea
|
id: tea
|
||||||
with:
|
with:
|
||||||
|
@ -149,7 +163,7 @@ jobs:
|
||||||
|
|
||||||
- uses: actions/download-artifact@v3
|
- uses: actions/download-artifact@v3
|
||||||
with:
|
with:
|
||||||
name: ${{ matrix.os }}
|
name: ${{ matrix.tag || matrix.os }}
|
||||||
|
|
||||||
- run: tar xzf artifacts.tgz
|
- run: tar xzf artifacts.tgz
|
||||||
working-directory: ${{ steps.tea.outputs.prefix }}
|
working-directory: ${{ steps.tea.outputs.prefix }}
|
||||||
|
@ -161,12 +175,16 @@ jobs:
|
||||||
run:
|
run:
|
||||||
working-directory: tea.xyz/var/pantry/scripts
|
working-directory: tea.xyz/var/pantry/scripts
|
||||||
needs: [test, build]
|
needs: [test, build]
|
||||||
runs-on: ${{ matrix.platform }}
|
runs-on: ${{ matrix.platform.os }}
|
||||||
strategy:
|
strategy:
|
||||||
matrix:
|
matrix:
|
||||||
platform:
|
platform:
|
||||||
- macos-11
|
- os: macos-11
|
||||||
- ubuntu-latest
|
- os: ubuntu-latest
|
||||||
|
- os: [self-hosted, macOS, ARM64]
|
||||||
|
tag: darwin-aarch64
|
||||||
|
- os: [self-hosted, linux, ARM64]
|
||||||
|
tag: linux-aarch64
|
||||||
compression:
|
compression:
|
||||||
- xz
|
- xz
|
||||||
- gz
|
- gz
|
||||||
|
@ -181,6 +199,15 @@ jobs:
|
||||||
repository: teaxyz/cli
|
repository: teaxyz/cli
|
||||||
token: ${{ secrets.TEMP_JACOBS_GITHUB_PAT }}
|
token: ${{ secrets.TEMP_JACOBS_GITHUB_PAT }}
|
||||||
|
|
||||||
|
- run: |
|
||||||
|
if test -d $TEA_PREFIX/tea.xyz; then
|
||||||
|
find $TEA_PREFIX/tea.xyz -mindepth 1 -maxdepth 1 -not \( -path $TEA_PREFIX/tea.xyz/var \) -print0 | \
|
||||||
|
xargs -0 rm -rf
|
||||||
|
fi
|
||||||
|
if: ${{ matrix.platform.tag }}
|
||||||
|
env:
|
||||||
|
TEA_PREFIX: ${{ github.workspace }}
|
||||||
|
|
||||||
- uses: teaxyz/setup@v0
|
- uses: teaxyz/setup@v0
|
||||||
id: tea
|
id: tea
|
||||||
with:
|
with:
|
||||||
|
@ -189,7 +216,7 @@ jobs:
|
||||||
|
|
||||||
- uses: actions/download-artifact@v3
|
- uses: actions/download-artifact@v3
|
||||||
with:
|
with:
|
||||||
name: ${{ matrix.platform }}
|
name: ${{ matrix.platform.tag || matrix.platform.os }}
|
||||||
path: ${{ steps.tea.outputs.prefix }}
|
path: ${{ steps.tea.outputs.prefix }}
|
||||||
|
|
||||||
- run: tar xzf artifacts.tgz
|
- run: tar xzf artifacts.tgz
|
||||||
|
|
2
.github/workflows/ci.yml
vendored
2
.github/workflows/ci.yml
vendored
|
@ -17,7 +17,5 @@ jobs:
|
||||||
uses: ./.github/workflows/build.yml
|
uses: ./.github/workflows/build.yml
|
||||||
with:
|
with:
|
||||||
projects: ${{ needs.get-diff.outputs.diff }}
|
projects: ${{ needs.get-diff.outputs.diff }}
|
||||||
# Don't use GITHUB_SHA for PRs: https://github.com/orgs/community/discussions/25191
|
|
||||||
ref: ${{ github.event.pull_request.head.sha }}
|
|
||||||
secrets: inherit
|
secrets: inherit
|
||||||
if: ${{ needs.get-diff.outputs.diff != '' }}
|
if: ${{ needs.get-diff.outputs.diff != '' }}
|
||||||
|
|
1
.github/workflows/new-version.yml
vendored
1
.github/workflows/new-version.yml
vendored
|
@ -13,5 +13,4 @@ jobs:
|
||||||
uses: ./.github/workflows/build.yml
|
uses: ./.github/workflows/build.yml
|
||||||
with:
|
with:
|
||||||
projects: ${{ inputs.projects }}
|
projects: ${{ inputs.projects }}
|
||||||
ref: ${{ github.sha }}
|
|
||||||
secrets: inherit
|
secrets: inherit
|
Loading…
Reference in a new issue