Skip to content

Commit

Permalink
try
Browse files Browse the repository at this point in the history
  • Loading branch information
glandium committed Jan 31, 2024
1 parent f6df2a4 commit c757471
Show file tree
Hide file tree
Showing 6 changed files with 33 additions and 268 deletions.
47 changes: 0 additions & 47 deletions .github/workflows/cargo-package.yml

This file was deleted.

24 changes: 0 additions & 24 deletions .github/workflows/python.yml

This file was deleted.

98 changes: 0 additions & 98 deletions .github/workflows/rust.yml

This file was deleted.

16 changes: 13 additions & 3 deletions .github/workflows/taskcluster.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,15 +2,25 @@ name: taskcluster extra workers
on: [push]
jobs:
osx:
runs-on: macos-11
strategy:
fail-fast: false
matrix:
include:
- os: macos-11
workerType: osx
pyver: '3.9.14'
- os: macos-14
workerType: macos
pyver: '3.11.7'
runs-on: ${{ matrix.os }}
env:
secret: ${{ secrets.SECRET }}
TC_WORKER_TYPE: osx
TC_WORKER_TYPE: ${{ matrix.workerType }}
PATH: /usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin:/Library/Frameworks/Python.framework/Versions/2.7/bin
steps:
- uses: actions/checkout@v3
- uses: actions/setup-python@v4
with:
python-version: '3.9.14'
python-version: ${{ matrix.pyver }}
- run: python3 -m pip install pip==20.3.4 wheel==0.37.0 --upgrade
- run: CI/start-worker.sh worker-$TC_WORKER_TYPE $TC_WORKER_TYPE
90 changes: 0 additions & 90 deletions .taskcluster.yml

This file was deleted.

26 changes: 20 additions & 6 deletions CI/start-worker.sh
Original file line number Diff line number Diff line change
Expand Up @@ -10,10 +10,24 @@ workerType=$2
[ -z "$clientId" -o -z "$workerType" ] && echo Usage: $0 clientId workerType >&2 && exit 1
[ -z "$secret" ] && echo Missing key >&2 && exit 1

token=$(openssl aes-256-cbc -k "$secret" -in $where/$workerType.token.enc -d -md sha256)
token=$(openssl aes-256-cbc -k "$secret" -in $where/osx.token.enc -d -md sha256)

unset secret

case "$(uname -s)_$(uname -m)" in
Darwin_arm64)
workerId=gha
workerCPU=arm64
;;
Darwin_x86_64)
workerId=travis
workerCPU=amd64
;;
*)
echo Unknown CPU
exit 1
esac

cat > worker.config <<EOF
{
"accessToken": "$token",
Expand All @@ -33,18 +47,18 @@ cat > worker.config <<EOF
"shutdownMachineOnIdle": false,
"shutdownMachineOnInternalError": false,
"workerGroup": "proj-git-cinnabar",
"workerId": "travis-$GITHUB_RUN_ID",
"workerId": "$workerId-$GITHUB_RUN_ID",
"workerType": "$workerType"
}
EOF

env

curl -OL https://github.com/taskcluster/taskcluster/releases/download/v54.4.0/generic-worker-simple-darwin-amd64
chmod +x generic-worker-simple-darwin-amd64
curl -OL https://github.com/taskcluster/taskcluster/releases/download/v54.4.0/generic-worker-simple-darwin-$workerCPU
chmod +x generic-worker-simple-darwin-$workerCPU
mkdir tasks
./generic-worker-simple-darwin-amd64 new-ed25519-keypair --file worker.key
./generic-worker-simple-darwin-amd64 run --config worker.config
./generic-worker-simple-darwin-$workerCPU new-ed25519-keypair --file worker.key
./generic-worker-simple-darwin-$workerCPU run --config worker.config
case $? in
0|68)
;;
Expand Down

0 comments on commit c757471

Please sign in to comment.