Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feature: Generate fixtures on push #303

Merged
merged 10 commits into from
Sep 21, 2023
2 changes: 1 addition & 1 deletion .github/workflows/docs_main.yaml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: Deploy
name: Deploy Docs Main

on:
push:
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/docs_tags.yaml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: Deploy
name: Deploy Docs Tags

on:
push:
Expand Down
93 changes: 93 additions & 0 deletions .github/workflows/fixtures.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,93 @@
name: Build and Package Fixtures

on:
push:
branches:
- main
tags:
- 'v*'
workflow_dispatch:

jobs:
build:
runs-on: ubuntu-latest
strategy:
matrix:
include:
- name: 'fixtures'
evm-type: 'main'
fill-params: ''
solc: '0.8.21'
python: '3.11'
- name: 'fixtures_hive'
evm-type: 'main'
fill-params: '--enable-hive --from=Merge'
solc: '0.8.21'
python: '3.11'
- name: 'fixtures_develop'
evm-type: 'develop'
fill-params: '--until=Cancun'
solc: '0.8.21'
python: '3.11'
- name: 'fixtures_develop_hive'
evm-type: 'develop'
fill-params: '--enable-hive --from=Merge --until=Cancun'
solc: '0.8.21'
python: '3.11'
steps:
- uses: actions/checkout@v3
with:
submodules: true
- uses: ./.github/actions/build-evm
id: evm-builder
with:
type: ${{ matrix.evm-type }}
- name: Setup Python
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python }}
- name: Install solc compiler
shell: bash
run: |
if [ "$RUNNER_OS" == "Linux" ]; then PLATFORM="linux-amd64"; else PLATFORM="macosx-amd64"; fi
RELEASE_NAME=$(curl https://binaries.soliditylang.org/${PLATFORM}/list.json | jq -r --arg SOLC_VERSION "${{ matrix.solc }}" '.releases[$SOLC_VERSION]')
wget -O $GITHUB_WORKSPACE/bin/solc https://binaries.soliditylang.org/${PLATFORM}/$RELEASE_NAME
chmod a+x $GITHUB_WORKSPACE/bin/solc
echo $GITHUB_WORKSPACE/bin >> $GITHUB_PATH
- name: Run fixtures fill
shell: bash
run: |
pip install --upgrade pip
python -m venv env
source env/bin/activate
pip install -e .
fill ${{ matrix.fill-params }}
- name: Create fixtures info file
shell: bash
run: |
echo -e "ref: $GITHUB_REF \ncommit: $GITHUB_SHA\nbuild: $(date +"%Y-%m-%dT%H:%M:%SZ")" \
> fixtures/info.txt
- name: Tar fixtures output
shell: bash
run: |
tar -czvf ${{ matrix.name }}.tar.gz ./fixtures
- uses: actions/upload-artifact@v3
with:
name: ${{ matrix.name }}
path: ${{ matrix.name }}.tar.gz
release:
runs-on: ubuntu-latest
needs: build
if: startsWith(github.ref, 'refs/tags/')
steps:
- name: Download artifacts
uses: actions/download-artifact@v3
with:
path: .
- name: Draft Release
uses: softprops/action-gh-release@v1
with:
files: './**'
draft: true
generate_release_notes: true
fail_on_unmatched_files: true
2 changes: 1 addition & 1 deletion .github/workflows/test.yaml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: Ethereum Testing Tools
name: Run Tox Verifications

on: [push, pull_request, workflow_dispatch]

Expand Down