Skip to content

Commit

Permalink
Merge branch 'template/master'
Browse files Browse the repository at this point in the history
  • Loading branch information
SamWilsn committed Feb 14, 2025
2 parents 2b2291b + 2aa2361 commit 4277a75
Show file tree
Hide file tree
Showing 19 changed files with 633 additions and 0 deletions.
8 changes: 8 additions & 0 deletions .gitattributes
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
# GitHub highlighting for Solidity files
# See https://github.com/github/linguist/pull/3973#issuecomment-357507741
*.sol linguist-language=Solidity

# Force Linux line endings on all files
# Necessary for running eipw locally
* text=auto eol=lf
.gitignore -text
1 change: 1 addition & 0 deletions .github/CODEOWNERS
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
* @SamWilsn
3 changes: 3 additions & 0 deletions .github/CONTRIBUTING.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
Please review the [Working Group Charter](@@charter-url@@) for proposal guidelines.

<!-- RATIONALE FOR THIS FILE: IT IS DISPLAYED WHEN YOU CREATE AN ISSUE OR MAKE A PR -->
12 changes: 12 additions & 0 deletions .github/ISSUE_TEMPLATE.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
<!--
⚠️ **ATTENTION** If you are trying to submit an EIP, stop what you are doing! ⚠️
EIPs must be submitted as Pull Requests, and not as Issues.
For anything else, please carry on!
Thank you,
The EIP Editors
-->
29 changes: 29 additions & 0 deletions .github/ISSUE_TEMPLATE/bug-report.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
name: Bug Report
description: Something should've worked, but it didn't.
labels: ['bug']

body:
- type: markdown
attributes:
value: Thanks for taking the time to fill out this bug report!
- type: input
id: pull-request
attributes:
label: Pull Request
description: Link to the pull request where the issue occurred
validations:
required: false
- type: textarea
id: what-happened
attributes:
label: What happened?
description: Also tell us, what did you expect to happen?
placeholder: Tell us what you see!
validations:
required: true
- type: textarea
id: logs
attributes:
label: Relevant log output
description: Please copy and paste any relevant log output. This will be automatically formatted into code, so no need for backticks.
render: shell
8 changes: 8 additions & 0 deletions .github/ISSUE_TEMPLATE/config.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
blank_issues_enabled: true
contact_links:
- name: Do you want to propose a change to the EIP process itself?
url: https://github.com/ethereum-cat-herders/EIPIP/issues
about: Use the Ethereum Improvement Proposal Improvement Process (EIPIP) repository!
- name: Do you want to discuss EIP ideas or ask questions about the process?
url: https://ethereum-magicians.org/
about: Use the Fellowship of Ethereum Magicians for EIP-related discussion!
11 changes: 11 additions & 0 deletions .github/PULL_REQUEST_TEMPLATE.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
<!--
When opening a pull request to submit a new EIP, please use the suggested template: @@template-url@@
We have a GitHub bot that automatically merges some PRs. It will merge yours immediately if certain criteria are met:
- The PR edits only existing mutable proposals.
- The build passes.
- Your GitHub username is listed as an author in each modified proposal, inside (parentheses).
-->
50 changes: 50 additions & 0 deletions .github/actions/build-eips/action.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
name: 'build-eips'

description: 'Run the build-eips tool'

inputs:
args:
description: 'Command-line arguments to pass to build-eips'
required: true

outputs:
stdout:
description: 'Standard output from build-eips'
value: ${{ steps.run-build-eips.outputs.stdout }}

runs:
using: "composite"
steps:
- name: Rust Cache
uses: Swatinem/rust-cache@f0deed1e0edfc6a9be95417288c0e1099b1eeec3

- name: Install build-eips
id: install-build-eips
shell: bash
run: |
WHERE="$(mktemp -d)"
(
cd "$WHERE";
wget https://github.com/eips-wg/preprocessor/releases/latest/download/build-eips-ubuntu.tar.xz;
tar xvf build-eips-ubuntu.tar.xz;
)
echo "bin=$WHERE/build-eips" >> "$GITHUB_OUTPUT"
- name: Install Zola
shell: bash
run: cargo install --locked --git https://github.com/getzola/zola.git --rev bcbcd1e7edfc4e011b0760aaaba965878144a7d3

- name: Run build-eips
id: run-build-eips
shell: bash
env:
BUILD_EIPS_ARGS: ${{ inputs.args }}
BUILD_EIPS: ${{ steps.install-build-eips.outputs.bin }}
run: |
set -euf -o pipefail
write_eof() {
echo -e "\nEOF" >> "$GITHUB_OUTPUT"
}
echo "stdout<<EOF" >> "$GITHUB_OUTPUT"
trap write_eof EXIT
"$BUILD_EIPS" $BUILD_EIPS_ARGS | awk '{ print; if ($0 == "EOF") exit 1 }' | tee -a "$GITHUB_OUTPUT"
86 changes: 86 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,86 @@
name: Continuous Integration

on:
pull_request:
types:
- opened
- reopened
- synchronize
- ready_for_review
- edited

concurrency:
group: ${{ github.workflow }}-${{ github.repository }}-${{ github.event.pull_request.number || github.ref }}
cancel-in-progress: true

jobs:
# Stores metadata about the pull request so that `post-ci.yml` can leave a
# useful comment on the pull request.
save-pr:
if: github.event.pull_request.base.repo.owner.login == 'eips-wg'
name: Save Pull Request Metadata
runs-on: ubuntu-latest

steps:
- name: Build Artifact
env:
PR_NUMBER: ${{ github.event.number }}
PR_SHA: ${{ github.event.pull_request.head.sha }}
MERGE_SHA: ${{ github.sha }}
run: |
mkdir -p ./pr
echo $PR_NUMBER > ./pr/pr_number
echo $PR_SHA > ./pr/pr_sha
echo $MERGE_SHA > ./pr/merge_sha
- name: Upload Artifact
uses: actions/upload-artifact@65c4c4a1ddee5b72f698fdd19549f0f0fb45cf08 # 4.6.0
with:
name: pr_number
path: pr/

check:
if: github.event.pull_request.base.repo.owner.login == 'eips-wg'
name: Check
runs-on: ubuntu-latest

steps:
- name: Checkout
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # 4.2.2
with:
fetch-depth: 0

- name: EIPs Build (Check)
uses: ./.github/actions/build-eips
with:
args: check

markdownlint:
if: github.event.pull_request.base.repo.owner.login == 'eips-wg'
name: Markdown Linter
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # 4.2.2
with:
fetch-depth: 0

- name: Get Changed Files
id: changed-files
uses: ./.github/actions/build-eips
with:
args: changed

- name: Checkout (Config)
if: steps.changed-files.outputs.stdout
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # 4.2.2
with:
repository: eips-wg/theme
path: theme

- name: Markdown Lint
if: steps.changed-files.outputs.stdout
uses: DavidAnson/markdownlint-cli2-action@05f32210e84442804257b2a6f20b273450ec8265 # 19.1.0
with:
config: ./theme/config/config.markdownlint.yaml
globs: ${{ steps.changed-files.outputs.stdout }}
58 changes: 58 additions & 0 deletions .github/workflows/post-ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,58 @@
on:
workflow_run:
workflows:
- Continuous Integration
types:
- completed

# This is adapted from https://docs.github.com/en/actions/using-workflows/events-that-trigger-workflows#workflow_run (2022-07-17)

name: Post Continuous Integration

jobs:
ci:
if: github.event.workflow_run.repository.owner.login == 'eips-wg'
steps:
- name: Fetch PR Number
uses: dawidd6/action-download-artifact@20319c5641d495c8a52e688b7dc5fada6c3a9fbc # v8
with:
name: pr_number
workflow: ci.yml
run_id: ${{ github.event.workflow_run.id }}

- name: Save PR Data
id: save-pr-data
run: |
echo "pr_number=$(cat pr_number)" >> $GITHUB_OUTPUT
echo "pr_sha=$(cat pr_sha)" >> $GITHUB_OUTPUT
echo "merge_sha=$(cat merge_sha)" >> $GITHUB_OUTPUT
- name: Add Comment
uses: marocchino/sticky-pull-request-comment@52423e01640425a022ef5fd42c6fb5f633a02728 # 2.9.1
if: ${{ github.event.workflow_run.conclusion == 'failure' }}
with:
number: ${{ steps.save-pr-data.outputs.pr_number }}
recreate: true
message: |
The commit ${{ steps.save-pr-data.outputs.pr_sha }} (as a parent of ${{ steps.save-pr-data.outputs.merge_sha }}) contains errors.
Please inspect the [Run Summary](${{ github.event.workflow_run.html_url }}) for details.
- name: Add Waiting Label
uses: actions-ecosystem/action-add-labels@18f1af5e3544586314bbe15c0273249c770b2daf # 1.1.3
if: ${{ github.event.workflow_run.conclusion == 'failure' }}
with:
labels: w-ci
number: ${{ steps.save-pr-data.outputs.pr_number }}
repo: ${{ github.repository }}
github_token: ${{ github.token }}

- name: Remove Waiting Label
uses: actions-ecosystem/action-remove-labels@d05162525702062b6bdef750ed8594fc024b3ed7
if: ${{ github.event.workflow_run.conclusion != 'failure' }}
with:
labels: w-ci
number: ${{ steps.save-pr-data.outputs.pr_number }}
repo: ${{ github.repository }}
github_token: ${{ github.token }}


48 changes: 48 additions & 0 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
name: Publish

on:
push:
branches:
- master

jobs:
build:
if: github.repository_owner == 'eips-wg'
name: Build Pages
runs-on: ubuntu-latest

steps:
- name: Checkout
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # 4.2.2
with:
fetch-depth: 0

- name: EIPs Build (Build)
uses: ./.github/actions/build-eips
with:
# Disable eipw lints because there will never be any changed files
# between this checkout and `master` because, well, we just checked
# out `master`.
args: build --no-lint

- name: Upload Artifact
id: artifact
uses: actions/upload-pages-artifact@56afc609e74202658d3ffba0e8f6dda462b719fa # 3.0.1
with:
path: build/output

publish:
if: github.repository_owner == 'eips-wg'
name: Publish Pages
runs-on: ubuntu-latest
needs: build
permissions:
pages: write
id-token: write
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
steps:
- name: Publish Pages
id: deployment
uses: actions/deploy-pages@d6db90164ac5ed86f2b6aed7e0febac5b3c0c03e # 4.0.5
64 changes: 64 additions & 0 deletions .github/workflows/review-trigger.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,64 @@
name: Review Trigger

on:
pull_request_target:
pull_request_review:
workflow_dispatch:
inputs:
pr_number:
description: Pull Request Number
type: string
required: true
issue_comment:
types:
- created

concurrency:
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
cancel-in-progress: true

jobs:
trigger:
if: github.event.repository.owner.login == 'eips-wg'
runs-on: ubuntu-latest
name: Trigger Review
steps:
- name: Write PR Number - PR Target
run: echo $PR_NUMBER > pr-number.txt
env:
PR_NUMBER: ${{ github.event.number }}
if: |
github.event_name == 'pull_request_target' &&
!endsWith(github.event.sender.login, '-bot') &&
!endsWith(github.event.sender.login, '[bot]')
- name: Write PR Number - PR Review
run: echo $PR_NUMBER > pr-number.txt
env:
PR_NUMBER: ${{ github.event.pull_request.number }}
if: |
github.event_name == 'pull_request_review' &&
!endsWith(github.event.sender.login, '-bot') &&
!endsWith(github.event.sender.login, '[bot]')
- name: Write PR Number - Workflow Dispatch
run: echo $PR_NUMBER > pr-number.txt
if: github.event_name == 'workflow_dispatch'
env:
PR_NUMBER: ${{ inputs.pr_number }}

- name: Write PR Number - Comment Retrigger
run: echo $PR_NUMBER > pr-number.txt
env:
PR_NUMBER: ${{ github.event.issue.number }}
if: |
github.event_name == 'issue_comment' &&
github.event.issue.pull_request &&
contains(github.event.comment.body, '@eth-bot rerun')
- name: Save PR Number
uses: actions/upload-artifact@65c4c4a1ddee5b72f698fdd19549f0f0fb45cf08 # 4.6.0
with:
name: pr-number
path: pr-number.txt
if-no-files-found: ignore
Loading

0 comments on commit 4277a75

Please sign in to comment.