diff --git a/.github/workflows/cargo-package.yml b/.github/workflows/cargo-package.yml deleted file mode 100644 index 492fdc57d..000000000 --- a/.github/workflows/cargo-package.yml +++ /dev/null @@ -1,47 +0,0 @@ -name: cargo package -on: - push: - paths: - - 'Cargo.toml' - - 'Cargo.lock' - - 'git-core' - - '.github/workflows/cargo-package.yml' - pull_request: - paths: - - 'Cargo.toml' - - 'Cargo.lock' - - 'git-core' - - '.github/workflows/cargo-package.yml' -jobs: - package: - strategy: - fail-fast: false - matrix: - os: [ubuntu-latest, macos-latest] - toolchain: [1.75.0] - include: - - os: windows-latest - toolchain: 1.75.0-x86_64-pc-windows-gnu - runs-on: ${{ matrix.os }} - steps: - - uses: actions/checkout@v3 - with: - submodules: true - - uses: dtolnay/rust-toolchain@master - with: - toolchain: ${{ matrix.toolchain }} - - uses: msys2/setup-msys2@v2 - with: - release: false - update: false - msystem: MINGW64 - install: >- - mingw-w64-x86_64-gcc - mingw-w64-x86_64-make - patch - if: runner.os == 'Windows' - - name: Update PATH - run: | - (Resolve-Path c:/msys64/mingw64/bin).Path >> $Env:GITHUB_PATH - if: runner.os == 'Windows' - - run: cargo package diff --git a/.github/workflows/python.yml b/.github/workflows/python.yml deleted file mode 100644 index 3a5768c4f..000000000 --- a/.github/workflows/python.yml +++ /dev/null @@ -1,24 +0,0 @@ -name: python checks -on: - push: - paths: - - '**.py' - - '.github/workflows/python.yml' - pull_request: - paths: - - '**.py' - - '.github/workflows/python.yml' -jobs: - flake8: - strategy: - fail-fast: false - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v3 - - uses: actions/setup-python@v4 - with: - python-version: '3.9' - - name: flake8 - run: | - pip install flake8==4.0.1 - flake8 --ignore E402,F405,W504,E741 diff --git a/.github/workflows/rust.yml b/.github/workflows/rust.yml deleted file mode 100644 index 6d35c9fc1..000000000 --- a/.github/workflows/rust.yml +++ /dev/null @@ -1,98 +0,0 @@ -name: rust checks -on: [push, pull_request] -jobs: - clippy: - strategy: - fail-fast: false - matrix: - os: [ubuntu-latest, macos-latest] - toolchain: [1.75.0] - include: - - os: windows-latest - toolchain: 1.75.0-x86_64-pc-windows-gnu - runs-on: ${{ matrix.os }} - steps: - - uses: actions/checkout@v3 - with: - submodules: true - - uses: actions/cache@v3 - with: - path: | - ~/.cargo/registry - ~/.cargo/git - target - key: ${{ runner.os }}-clippy-${{ hashFiles('Cargo.lock', 'Cargo.toml') }} - - uses: dtolnay/rust-toolchain@master - with: - toolchain: ${{ matrix.toolchain }} - components: clippy - - uses: msys2/setup-msys2@v2 - with: - release: false - update: false - msystem: MINGW64 - install: >- - mingw-w64-x86_64-gcc - mingw-w64-x86_64-make - patch - if: runner.os == 'Windows' - - name: Update PATH - run: | - (Resolve-Path c:/msys64/mingw64/bin).Path >> $Env:GITHUB_PATH - if: runner.os == 'Windows' - # From https://github.com/actions-rs/clippy-check/pull/165 - - uses: kristof-mattei/clippy-check@9615027d0d038d93ede0037e3629366a5ba2ecf8 - with: - args: -vv --features self-update -- -D warnings - - fmt: - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v3 - - uses: dtolnay/rust-toolchain@master - with: - toolchain: 1.75.0 - components: rustfmt - - run: cargo fmt -- --check - - test: - strategy: - fail-fast: false - matrix: - os: [ubuntu-latest, macos-latest] - toolchain: [1.75.0, 1.70.0] - include: - - os: windows-latest - toolchain: 1.75.0-x86_64-pc-windows-gnu - - os: windows-latest - toolchain: 1.70.0-x86_64-pc-windows-gnu - runs-on: ${{ matrix.os }} - steps: - - uses: actions/checkout@v3 - with: - submodules: true - - uses: actions/cache@v3 - with: - path: | - ~/.cargo/registry - ~/.cargo/git - target - key: ${{ runner.os }}-cargo-${{ matrix.toolchain }}-test-${{ hashFiles('Cargo.lock', 'Cargo.toml') }} - - uses: dtolnay/rust-toolchain@master - with: - toolchain: ${{ matrix.toolchain }} - - uses: msys2/setup-msys2@v2 - with: - release: false - update: false - msystem: MINGW64 - install: >- - mingw-w64-x86_64-gcc - mingw-w64-x86_64-make - patch - if: runner.os == 'Windows' - - name: Update PATH - run: | - (Resolve-Path c:/msys64/mingw64/bin).Path >> $Env:GITHUB_PATH - if: runner.os == 'Windows' - - run: cargo test diff --git a/.github/workflows/taskcluster.yml b/.github/workflows/taskcluster.yml index 1ffb748dd..d7a241828 100644 --- a/.github/workflows/taskcluster.yml +++ b/.github/workflows/taskcluster.yml @@ -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 diff --git a/.taskcluster.yml b/.taskcluster.yml deleted file mode 100644 index 0cb721e88..000000000 --- a/.taskcluster.yml +++ /dev/null @@ -1,90 +0,0 @@ -version: 1 -policy: - pullRequests: public -tasks: - - $if: 'tasks_for == "github-push" || (tasks_for == "github-pull-request" && event["action"] in ["opened", "reopened", "synchronize"])' - then: - $let: - e: # FIXME after https://github.com/taskcluster/json-e/issues/249 - $if: 'tasks_for == "github-push"' - then: - repo_name: ${event.repository.name} - repo_url: ${event.repository.url} - base_repo_url: ${event.repository.url} - login: ${event.pusher.name} - commit: ${event.after} - branch: - $if: 'event.ref[:11] == "refs/heads/"' - then: ${event.ref[11:]} - base_repo_name: ${event.repository.name} - base_login: ${event.repository.owner.name} - decision_id: - $if: 'event.ref[:10] == "refs/tags/"' - then: ${event.ref[10:]} - else: ${event.after} - else: - repo_name: ${event.pull_request.head.repo.name} - repo_url: ${event.pull_request.head.repo.clone_url} - base_repo_url: ${event.pull_request.base.repo.clone_url} - login: ${event.pull_request.head.user.login} - commit: ${event.pull_request.head.sha} - branch: ${event.pull_request.base.ref} - base_repo_name: ${event.pull_request.base.repo.name} - base_login: ${event.pull_request.base.repo.owner.login} - decision_id: - taskGroupId: {$eval: as_slugid("decision")} - in: - taskId: ${taskGroupId} - taskGroupId: ${taskGroupId} - schedulerId: taskcluster-github - provisionerId: proj-git-cinnabar - workerType: linux - retries: 5 - scopes: - $flatten: - - assume:repo:github.com/${e.base_login}/${e.base_repo_name}:decision-task - - $if: 'tasks_for == "github-push"' - then: - - 'queue:route:index.project.git-cinnabar.*' - - secrets:get:project/git-cinnabar/codecov - routes: - $if: 'e.decision_id' - then: - - 'index.project.git-cinnabar.decision.${e.decision_id}' - payload: - maxRunTime: 3600 - features: - taskclusterProxy: true - env: - TC_PROXY: "1" - TC_DATA: {$json: {$eval: e}} - TC_GROUP_ID: ${taskGroupId} - TC_IS_PUSH: {$if: 'tasks_for == "github-push"', then: "1"} - command: - - - sh - - '-c' - - >- - git clone -n ${e.base_repo_url} repo && - git -C repo remote add head ${e.repo_url} && - git -C repo remote update head && - git -c advice.detachedHead=false -C repo checkout ${e.commit} && - python3 -m venv venv && - venv/bin/pip install pyyaml==6.0 requests==2.27.1 && - venv/bin/python3 repo/CI/decision.py - artifacts: - $if: 'e.decision_id' - then: - - name: public/actions.json - path: actions.json - type: file - created: {$fromNow: ''} - deadline: {$fromNow: '2 hours'} - expires: - $if: 'tasks_for == "action"' - then: {$fromNow: '6 hours'} - else: {$fromNow: '26 weeks'} - metadata: - name: decision task - description: ${e.repo_name} decision task - owner: ${e.login}@users.noreply.github.com - source: ${e.repo_url} diff --git a/CI/start-worker.sh b/CI/start-worker.sh index 27d5eec57..9ec14cd35 100755 --- a/CI/start-worker.sh +++ b/CI/start-worker.sh @@ -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 < worker.config <