Skip to content

Commit

Permalink
ci: reinstate worfklows-to be disabled add github level
Browse files Browse the repository at this point in the history
  • Loading branch information
georgebisbas committed Nov 22, 2023
1 parent 3bb1f0d commit 2b38651
Show file tree
Hide file tree
Showing 11 changed files with 1,112 additions and 1 deletion.
96 changes: 96 additions & 0 deletions .github/workflows/asv.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,96 @@
# Runner information:
# CPU: Intel(R) Core(TM) i7-6700K CPU @ 4.00GHz
# GPU: NVIDIA GeForce RTX 2060

name: asv-benchmarks

env:
OUTPUT_PATH: ${{ github.workspace }}
ENVHOME: "/home/devito/environments"

on:
workflow_dispatch:
inputs:
tags:
description: 'Run ASV'
# Trigger the workflow on push to the master branch
push:
branches:
- master

jobs:

# Run the asv benchmarks on the self-hosted runner
benchmarks:
name: benchmarks
runs-on: [self-hosted, asv]

env:
DEVITO_ARCH: "gcc-9"
DEVITO_LANGUAGE: "openmp"
DEVITO_BENCHMARKS: "1"
DEVITO_LOGGING: "PERF"
OMP_NUM_THREADS: "8"
CC: "gcc-9"
CXX: "g++-9"

steps:
- name: Checkout devito
uses: actions/checkout@v3

- name: Set VIRTUAL_ENV
run: |
echo "VIRTUAL_ENV=$ENVHOME/asv" >> $GITHUB_ENV
echo "PATH=$VIRTUAL_ENV/bin:$PATH" >> $GITHUB_ENV
- name: Set PATH
run: |
echo "PATH=$VIRTUAL_ENV/bin:$PATH" >> $GITHUB_ENV
- name: Install dependencies
run: |
pip install --upgrade pip
pip install --upgrade asv
- name: Setup asv
run: |
asv machine --config benchmarks/regression/asv.conf.json --machine i7-6700K --os ubuntu-20.10 --arch x86-64 --cpu i7-6700K --num_cpu 8 --ram 16GB
- name: Run benchmarks
run: |
asv run -v --show-stderr --config benchmarks/regression/asv.conf.json --cpu-affinity 0-7 --machine i7-6700K
- name: Checkout asv-results branch
uses: actions/checkout@v3
with:
ref: asv-results
clean: false

- name: Commit benchmarks results
run: |
git config --local user.email "[email protected]"
git config --local user.name "GitHub Action"
asv run --config benchmarks/regression/asv.conf.json --bench just-discover --machine i7-6700K
git add -f benchmarks/regression/.asv/results/
git status
git commit -m "Commit ASV results"
- name: Push benchmarks results to the asv-results branch
uses: ad-m/github-push-action@master
with:
branch: asv-results
force: true
github_token: ${{ secrets.GITHUB_TOKEN }}

- name: Create results (html)
run: |
asv publish --config benchmarks/regression/asv.conf.json
rm -f /tmp/ssh-auth.sock
- name: Deploy results to devitocodes/devito-performance/gh-pages
uses: peaceiris/actions-gh-pages@v3
with:
deploy_key: ${{ secrets.ACTIONS_DEPLOY_KEY }}
external_repository: devitocodes/devito-performance
publish_branch: gh-pages
publish_dir: ./benchmarks/regression/.asv/html
214 changes: 214 additions & 0 deletions .github/workflows/docker-bases.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,214 @@
name: Build base compilers docker images

concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true

on:
push:
paths:
- '/docker/Dockerfile.nvidia'
- '/docker/Dockerfile.cpu'
- '/docker/Dockerfile.amd'
workflow_dispatch:
inputs:
tags:
description: 'Build compiler bases'
schedule:
# Run once a week
- cron: "0 13 * * 1"

jobs:
#######################################################
############## Basic gcc CPU ##########################
#######################################################
deploy-cpu-bases:
name: "cpu-base"
runs-on: ubuntu-latest
env:
DOCKER_BUILDKIT: "1"

steps:
- name: Checkout devito
uses: actions/checkout@v3

- name: Check event name
run: echo ${{ github.event_name }}

- name: Set up QEMU
uses: docker/setup-qemu-action@v2

- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v2

- name: Login to DockerHub
uses: docker/login-action@v2
with:
username: ${{ secrets.DOCKER_USERNAME }}
password: ${{ secrets.DOCKER_PASSWORD }}

- name: cleanup
run: docker system prune -a -f

- name: GCC image
uses: docker/build-push-action@v3
with:
context: .
file: './docker/Dockerfile.cpu'
push: true
target: 'gcc'
build-args: 'arch=gcc'
tags: 'devitocodes/bases:cpu-gcc'

#######################################################
############## Intel OneApi CPU #######################
#######################################################
deploy-oneapi-bases:
name: "oneapi-base"
runs-on: ubuntu-latest
env:
DOCKER_BUILDKIT: "1"

steps:
- name: Checkout devito
uses: actions/checkout@v3

- name: Check event name
run: echo ${{ github.event_name }}

- name: Set up QEMU
uses: docker/setup-qemu-action@v2

- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v2

- name: Login to DockerHub
uses: docker/login-action@v2
with:
username: ${{ secrets.DOCKER_USERNAME }}
password: ${{ secrets.DOCKER_PASSWORD }}

- name: cleanup
run: docker system prune -a -f

- name: ICX image
uses: docker/build-push-action@v3
with:
context: .
file: './docker/Dockerfile.cpu'
push: true
target: 'icx'
build-args: 'arch=icx'
tags: 'devitocodes/bases:cpu-icx'

#######################################################
################### Nvidia nvhpc ######################
#######################################################
deploy-nvidia-bases:
name: "nvidia-bases"
runs-on: ["self-hosted", "nvidiagpu"]
env:
DOCKER_BUILDKIT: "1"

steps:
- name: Checkout devito
uses: actions/checkout@v3

- name: Check event name
run: echo ${{ github.event_name }}

- name: Set up QEMU
uses: docker/setup-qemu-action@v2

- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v2

- name: Login to DockerHub
uses: docker/login-action@v2
with:
username: ${{ secrets.DOCKER_USERNAME }}
password: ${{ secrets.DOCKER_PASSWORD }}

- name: cleanup
run: docker system prune -a -f

- name: NVC image
uses: docker/build-push-action@v3
with:
context: .
file: './docker/Dockerfile.nvidia'
push: true
target: 'nvc'
build-args: 'arch=nvc'
tags: 'devitocodes/bases:nvidia-nvc'

- name: NVCC image
uses: docker/build-push-action@v3
with:
context: .
file: './docker/Dockerfile.nvidia'
push: true
target: 'nvcc'
build-args: 'arch=nvcc'
tags: 'devitocodes/bases:nvidia-nvcc'

- name: NVC host image
uses: docker/build-push-action@v3
with:
context: .
file: './docker/Dockerfile.nvidia'
push: true
target: 'nvc-host'
build-args: 'arch=nvc-host'
tags: 'devitocodes/bases:cpu-nvc'

#######################################################
##################### AMD #############################
#######################################################
deploy-amd-bases:
name: "amd-base"
runs-on: ["self-hosted", "amdgpu"]
env:
DOCKER_BUILDKIT: "1"

steps:
- name: Checkout devito
uses: actions/checkout@v3

- name: Check event name
run: echo ${{ github.event_name }}

- name: Set up QEMU
uses: docker/setup-qemu-action@v2

- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v2

- name: Login to DockerHub
uses: docker/login-action@v2
with:
username: ${{ secrets.DOCKER_USERNAME }}
password: ${{ secrets.DOCKER_PASSWORD }}

- name: cleanup
run: docker system prune -a -f

- name: AMD image
uses: docker/build-push-action@v3
with:
context: .
file: './docker/Dockerfile.amd'
push: true
target: 'amdclang'
tags: devitocodes/bases:amd

- name: AMD HIP image
uses: docker/build-push-action@v3
with:
context: .
file: './docker/Dockerfile.amd'
push: true
target: 'hip'
build-args: |
arch=hip
tags: devitocodes/bases:amd-hip
Loading

0 comments on commit 2b38651

Please sign in to comment.