Skip to content

Commit

Permalink
Merge branch 'master' into track-allocations-for-errors
Browse files Browse the repository at this point in the history
# Conflicts:
#	pass/alloc.go
#	reg/types.go
#	reg/x86.go
  • Loading branch information
klauspost committed Oct 3, 2024
2 parents fe08d14 + e2b6ba5 commit 809912f
Show file tree
Hide file tree
Showing 258 changed files with 313,794 additions and 73,021 deletions.
56 changes: 56 additions & 0 deletions .github/actions/create-pull-request/action.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,56 @@
name: create-pull-request
description: Create Pull Request
inputs:
bot:
description: "Bot username"
required: false
default: "cadobot[bot]"
app_id:
description: "Bot App ID"
required: true
app_private_key:
description: "Bot App Private Key"
required: true
title:
description: "Pull request title"
required: true
branch:
description: "Branch name"
required: true
body:
description: "Body of the pull request"
required: true
draft:
description: "Create draft pull request"
required: false
default: false
runs:
using: composite
steps:
- name: Get Bot User
id: bot
uses: actions/github-script@d556feaca394842dc55e4734bf3bb9f685482fa0 # v6.3.3
with:
script: |
const res = await github.rest.users.getByUsername({username: '${{ inputs.bot }}'});
for (const [key, value] of Object.entries(res.data)) {
core.setOutput(key, value)
}
- name: Generate App Token
uses: tibdex/github-app-token@021a2405c7f990db57f5eae5397423dcc554159c # v1.7.0
id: app
with:
app_id: ${{ inputs.app_id }}
private_key: ${{ inputs.app_private_key }}
- name: Create Pull Request
uses: peter-evans/create-pull-request@331d02c7e2104af23ad5974d4d5cbc58a3e6dc77 # v4.2.2
with:
token: ${{ steps.app.outputs.token }}
commit-message: ${{ inputs.title }}
author: "${{ steps.bot.outputs.login }} <${{ steps.bot.outputs.id }}+${{ steps.bot.outputs.login }}@users.noreply.github.com>"
branch: ${{ inputs.branch }}
base: master
delete-branch: true
draft: ${{ inputs.draft }}
title: ${{ inputs.title }}
body: ${{ inputs.body }}
4 changes: 4 additions & 0 deletions .github/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
changelog:
exclude:
authors:
- cadobot
89 changes: 89 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,89 @@
name: ci
permissions:
contents: read
on:
push:
branches:
- master
pull_request:
schedule:
- cron: "17 12 * * 6"
jobs:
# Required job is a stub which only runs when other dependencies complete
# successfully. This is intended to be listed as a required check in a branch
# protection rule.
required:
needs:
- test
- coverage
- lint
runs-on: ubuntu-latest
steps:
- run: "true"
test:
strategy:
matrix:
go-version: [1.21.x, 1.22.x]
runs-on: ubuntu-latest
steps:
- name: Install Go
uses: actions/setup-go@c4a742cab115ed795e34d4513e2cf7d472deb55f # v3.3.1
with:
go-version: ${{ matrix.go-version }}
check-latest: true
- name: Checkout code
uses: actions/checkout@93ea575cb5d8a053eaa0ac8fa3b40d7e05a33cc8 # v3.1.0
with:
persist-credentials: false
- name: Bootstrap
run: ./script/bootstrap
- name: Build
run: go build ./...
- name: Test
run: go test -bench . ./...
coverage:
needs:
- test
runs-on: ubuntu-latest
steps:
- name: Install Go
uses: actions/setup-go@c4a742cab115ed795e34d4513e2cf7d472deb55f # v3.3.1
with:
go-version: 1.22.x
check-latest: true
- name: Checkout code
uses: actions/checkout@93ea575cb5d8a053eaa0ac8fa3b40d7e05a33cc8 # v3.1.0
with:
persist-credentials: false
- name: Bootstrap
run: ./script/bootstrap
- name: Coverage
run: ./script/coverage
- name: Upload Unit Test Coverage
uses: codecov/codecov-action@d9f34f8cd5cb3b3eb79b3e4b5dae3a16df499a70 # v3.1.1
with:
token: ${{ secrets.CODECOV_TOKEN }}
files: unittests.coverprofile
flags: unittests
- name: Upload Integration Test Coverage
uses: codecov/codecov-action@d9f34f8cd5cb3b3eb79b3e4b5dae3a16df499a70 # v3.1.1
with:
token: ${{ secrets.CODECOV_TOKEN }}
files: integration.coverprofile
flags: integration
lint:
runs-on: ubuntu-latest
steps:
- name: Install Go
uses: actions/setup-go@c4a742cab115ed795e34d4513e2cf7d472deb55f # v3.3.1
with:
go-version: 1.22.x
check-latest: true
- name: Checkout code
uses: actions/checkout@93ea575cb5d8a053eaa0ac8fa3b40d7e05a33cc8 # v3.1.0
with:
persist-credentials: false
- name: Bootstrap
run: ./script/bootstrap
- name: Lint
run: ./script/lint
32 changes: 32 additions & 0 deletions .github/workflows/deps.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
name: deps
permissions:
contents: read
on:
schedule:
- cron: "22 5 2 * *"
jobs:
upgrade:
runs-on: ubuntu-latest
steps:
- name: Install Go
uses: actions/setup-go@c4a742cab115ed795e34d4513e2cf7d472deb55f # v3.3.1
with:
go-version: 1.22.x
- name: Checkout code
uses: actions/checkout@93ea575cb5d8a053eaa0ac8fa3b40d7e05a33cc8 # v3.1.0
with:
persist-credentials: false
- name: Upgrade Modules
run: go get -u ./...
- name: Tidy
run: go mod tidy
- name: Diff
run: git diff
- name: Create Pull Request
uses: ./.github/actions/create-pull-request
with:
app_id: ${{ secrets.APP_ID }}
app_private_key: ${{ secrets.APP_PRIVATE_KEY }}
branch: auto-upgrade-deps
title: "all: upgrade direct dependencies"
body: "Auto-generated upgrade of module dependencies."
45 changes: 45 additions & 0 deletions .github/workflows/metadata.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
name: metadata
permissions:
contents: read
on:
workflow_dispatch:
schedule:
- cron: "24 5 1 * *"
jobs:
update:
runs-on: ubuntu-latest
steps:
- name: Install Go
uses: actions/setup-go@c4a742cab115ed795e34d4513e2cf7d472deb55f # v3.3.1
with:
go-version: 1.22.x
- name: Checkout code
uses: actions/checkout@93ea575cb5d8a053eaa0ac8fa3b40d7e05a33cc8 # v3.1.0
with:
persist-credentials: false
- name: Bootstrap
run: ./script/bootstrap
- name: Generate App Token
uses: tibdex/github-app-token@021a2405c7f990db57f5eae5397423dcc554159c # v1.7.0
id: app
with:
app_id: ${{ secrets.APP_ID }}
private_key: ${{ secrets.APP_PRIVATE_KEY }}
- name: Update Package Metadata
env:
GITHUB_TOKEN: ${{ steps.app.outputs.token }}
run: ./script/metadata
- name: Diff
run: git diff
- name: Generate
run: ./script/generate
- name: Diff
run: git diff
- name: Create Pull Request
uses: ./.github/actions/create-pull-request
with:
app_id: ${{ secrets.APP_ID }}
app_private_key: ${{ secrets.APP_PRIVATE_KEY }}
branch: auto-tests-thirdparty-update-metadata
title: "tests/thirdparty: update package metadata"
body: "Auto-generated update of third-party package metadata."
Loading

0 comments on commit 809912f

Please sign in to comment.