less hacks (#162)

This commit is contained in:
Max Howell 2022-09-28 19:19:56 -04:00 committed by GitHub
parent 2dedc20604
commit 2d750eae4e
2 changed files with 31 additions and 54 deletions

View file

@ -6,6 +6,9 @@ on:
required: true required: true
type: string type: string
env:
TEA_SECRET: ${{ secrets.TEA_SECRET }}
jobs: jobs:
queue-builder: queue-builder:
runs-on: ubuntu-latest runs-on: ubuntu-latest
@ -15,6 +18,7 @@ jobs:
curl https://app.tea.xyz/api/builder/enqueue \ curl https://app.tea.xyz/api/builder/enqueue \
-H "authorization: bearer ${{ secrets.TEA_API_TOKEN }}" \ -H "authorization: bearer ${{ secrets.TEA_API_TOKEN }}" \
-d "$GITHUB_SHA ${{ inputs.projects }}" -d "$GITHUB_SHA ${{ inputs.projects }}"
build: build:
runs-on: ${{ matrix.os }} runs-on: ${{ matrix.os }}
strategy: strategy:
@ -46,53 +50,43 @@ jobs:
repository: teaxyz/cli repository: teaxyz/cli
token: ${{ secrets.TEMP_JACOBS_GITHUB_PAT }} token: ${{ secrets.TEMP_JACOBS_GITHUB_PAT }}
- run: #FIXME **we provide curl** but it fails due to certificate errors
apt --yes install curl
if: ${{ matrix.os == 'ubuntu-latest' }}
- uses: teaxyz/setup@v0
id: tea
with:
prefix: /opt
- name: HACKS - name: HACKS
run: | run: |
case ${{ matrix.os }} in case ${{ matrix.os }} in
ubuntu-latest) ubuntu-latest)
rm -rf /opt/tea.xyz/var/pantry
ln -s $GITHUB_WORKSPACE/pantry /opt/tea.xyz/var/pantry
# no git in our image, needed for tea finding SRCROOT # no git in our image, needed for tea finding SRCROOT
mkdir .git ../cli/.git mkdir .git ../cli/.git
#FIXME needed for gdk-pixbuf #FIXME needed for gdk-pixbuf
apt --yes install shared-mime-info apt --yes install shared-mime-info
#FIXME **we provide curl** but it fails, we must figure out why
apt --yes install curl
;; ;;
macos-11) macos-11)
# screws up a lot of build scripts # screws up a lot of build scripts
# TODO stop using GHA images or chroot or something # TODO stop using GHA images or chroot or something
for x in /usr/local/*; do sudo mv $x /tmp; done for x in /usr/local/*; do sudo mv $x /tmp; done
sudo mkdir -p /opt/tea.xyz/var
sudo chown -R $(whoami):staff /opt
ln -s $GITHUB_WORKSPACE/pantry /opt/tea.xyz/var/pantry
# HACKs for teaxyz/setup since it currently requires the working dir to be a srcroot
cp README.md ..
mkdir ../.git
# for scripts/fix-machos.rb # for scripts/fix-machos.rb
sudo gem install ruby-macho sudo gem install ruby-macho
;; ;;
*) *)
exit 1 exit 1
esac esac
rm -rf /opt/tea.xyz/var
ln -s $GITHUB_WORKSPACE /opt/tea.xyz/var
touch /opt/.hack touch /opt/.hack
- uses: teaxyz/setup@v0 - run: scripts/sort.ts ${{ inputs.projects }}
env:
TEA_SECRET: ${{ secrets.TEA_SECRET }}
VERBOSE: 1
id: tea
with:
prefix: /opt
- name: sort topologically
run: scripts/sort.ts ${{ inputs.projects }}
id: sorted id: sorted
- run: ../cli/scripts/install.ts ${{ steps.sorted.outputs.pre-install }} - run: ../cli/scripts/install.ts ${{ steps.sorted.outputs.pre-install }}
@ -120,7 +114,7 @@ jobs:
runs-on: ${{ matrix.os }} runs-on: ${{ matrix.os }}
defaults: defaults:
run: run:
working-directory: pantry working-directory: tea.xyz/var/pantry
strategy: strategy:
matrix: matrix:
os: os:
@ -129,25 +123,18 @@ jobs:
steps: steps:
- uses: actions/checkout@v3 - uses: actions/checkout@v3
with: with:
path: pantry path: tea.xyz/var/pantry
- name: co cli - uses: actions/checkout@v3
uses: actions/checkout@v3
with: with:
path: cli path: tea.xyz/var/cli
repository: teaxyz/cli repository: teaxyz/cli
token: ${{ secrets.TEMP_JACOBS_GITHUB_PAT }} token: ${{ secrets.TEMP_JACOBS_GITHUB_PAT }}
- name: HACKS
run: |
mkdir -p ~/opt/tea.xyz/var
ln -s $GITHUB_WORKSPACE/pantry ~/opt/tea.xyz/var/pantry
cp README.md ..
- uses: teaxyz/setup@v0 - uses: teaxyz/setup@v0
id: tea id: tea
env: with:
TEA_SECRET: ${{ secrets.TEA_SECRET }} prefix: ${{ github.workspace }}
- uses: actions/download-artifact@v3 - uses: actions/download-artifact@v3
with: with:
@ -159,7 +146,7 @@ jobs:
bottle: bottle:
defaults: defaults:
run: run:
working-directory: pantry working-directory: tea.xyz/var/pantry
needs: [test, build] needs: [test, build]
runs-on: ${{ matrix.platform }} runs-on: ${{ matrix.platform }}
strategy: strategy:
@ -173,25 +160,18 @@ jobs:
steps: steps:
- uses: actions/checkout@v3 - uses: actions/checkout@v3
with: with:
path: pantry path: tea.xyz/var/pantry
- name: co cli - uses: actions/checkout@v3
uses: actions/checkout@v3
with: with:
path: cli path: tea.xyz/var/cli
repository: teaxyz/cli repository: teaxyz/cli
token: ${{ secrets.TEMP_JACOBS_GITHUB_PAT }} token: ${{ secrets.TEMP_JACOBS_GITHUB_PAT }}
- name: HACKS
run: |
mkdir -p ~/opt/tea.xyz/var
ln -s $GITHUB_WORKSPACE/pantry ~/opt/tea.xyz/var/pantry
cp README.md ..
- uses: teaxyz/setup@v0 - uses: teaxyz/setup@v0
id: tea id: tea
env: with:
TEA_SECRET: ${{ secrets.TEA_SECRET }} prefix: ${{ github.workspace }}
- uses: actions/download-artifact@v3 - uses: actions/download-artifact@v3
with: with:
@ -203,8 +183,6 @@ jobs:
env: env:
COMPRESSION: ${{ matrix.compression }} COMPRESSION: ${{ matrix.compression }}
- run: ls -la ${{ steps.bottle.outputs.bottles }}
- name: upload bottles - name: upload bottles
id: upload id: upload
run: scripts/upload.ts run: scripts/upload.ts

View file

@ -11,8 +11,7 @@ build:
tea.xyz/gx/cc: c99 tea.xyz/gx/cc: c99
script: | script: |
./configure --prefix="{{ prefix }}" ./configure --prefix="{{ prefix }}"
make --jobs {{ hw.concurrency }} make --jobs {{ hw.concurrency }} install
make install
test: test:
dependencies: dependencies: