-
Notifications
You must be signed in to change notification settings - Fork 72
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feature: Generate fixtures on push (#303)
* github: Add fixture generator workflow * workflows: fill hive fixtures from Merge * github: rename fixtures names * github: Rename workflows * github: add dispatch to fixtures workflow * github: Build fixtures on tags too * github: Draft release on tag * github: fix tags * github: consolidate single workflow * github: fixtures condition release job
- Loading branch information
Showing
4 changed files
with
96 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
name: Deploy | ||
name: Deploy Docs Main | ||
|
||
on: | ||
push: | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
name: Deploy | ||
name: Deploy Docs Tags | ||
|
||
on: | ||
push: | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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] | ||
|
||
|