Generate results page #761
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
name: Generate results page | |
on: | |
push: | |
schedule: | |
- cron: '0 3 * * *' | |
jobs: | |
generate-results-page: | |
if: ${{ !(github.actor == 'dependabot[bot]') }} | |
runs-on: [self-hosted, Linux, X64, gcp-custom-runners] | |
container: ubuntu:focal-20221130 | |
env: | |
GHA_SA: gh-sa-fpga-tool-perf-ci | |
GHA_MACHINE_TYPE: "n2-standard-4" | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Install prerequisites | |
run: | | |
apt update -qqy | |
apt install -qqy curl python3 python3-pip gnupg2 git | |
echo "deb [signed-by=/usr/share/keyrings/cloud.google.gpg] https://packages.cloud.google.com/apt cloud-sdk main" | tee -a /etc/apt/sources.list.d/google-cloud-sdk.list | |
curl https://packages.cloud.google.com/apt/doc/apt-key.gpg | apt-key --keyring /usr/share/keyrings/cloud.google.gpg add - | |
apt update -qqy | |
apt install -qqy google-cloud-cli | |
- name: Make environment | |
run: | | |
python3 -m pip install virtualenv | |
cd results | |
make env | |
- name: Use gcloud CLI | |
run: | | |
cd results | |
mkdir build-results | |
gsutil cp gs://${{ secrets.GCP_STORAGE_BUCKET }}/*.json.gz build-results | |
- name: Build HTML | |
run: | | |
cd results | |
make preprocess | |
make build | |
- uses: actions/upload-artifact@v3 | |
with: | |
name: html-results | |
path: results/build/* | |
- name: Deploy to GH pages | |
if: ${{ (github.event_name == 'push' || github.event_name == 'schedule') && | |
github.ref == 'refs/heads/main' }} | |
run: | | |
cd results/build | |
git init | |
cp ../../.git/config ./.git/config | |
git add . | |
git config --local user.email "push@gha" | |
git config --local user.name "GHA" | |
git commit -am "update ${{ github.sha }}" | |
git push -u origin +HEAD:gh-pages |