diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml new file mode 100644 index 0000000..5f32310 --- /dev/null +++ b/.github/workflows/ci.yaml @@ -0,0 +1,18 @@ +name: ci + +on: + push: + branches: [ develop ] + pull_request: + branches: [ develop ] + +concurrency: + group: ci-${{github.ref}}-${{github.event.pull_request.number || github.run_number}} + cancel-in-progress: true + +jobs: + formatting: + uses: ./.github/workflows/formatting.yaml + nvidia-gpu: + needs: [ formatting ] + uses: ./.github/workflows/nvidia-rtx-3090-tests.yaml diff --git a/.github/workflows/formatting-tests.yaml b/.github/workflows/formatting.yaml similarity index 71% rename from .github/workflows/formatting-tests.yaml rename to .github/workflows/formatting.yaml index 5d09fa9..7cdac5c 100644 --- a/.github/workflows/formatting-tests.yaml +++ b/.github/workflows/formatting.yaml @@ -1,18 +1,16 @@ name: formatting tests on: - push: - branches: [ develop ] - pull_request: - branches: [ develop ] + workflow_dispatch: + workflow_call: + +concurrency: + group: unit_tests-${{github.ref}}-${{github.event.pull_request.number || github.run_number}} + cancel-in-progress: true jobs: formatting: - runs-on: ${{ matrix.os }} - - strategy: - matrix: - os: [ubuntu-latest, macos-latest] + runs-on: [ubuntu-latest] steps: - uses: actions/checkout@v2 @@ -34,3 +32,4 @@ jobs: run: | black --diff --check . flake8 + diff --git a/.github/workflows/nvidia-tests.yaml b/.github/workflows/nvidia-rtx-3090-tests.yaml similarity index 85% rename from .github/workflows/nvidia-tests.yaml rename to .github/workflows/nvidia-rtx-3090-tests.yaml index 3827c8b..266841c 100644 --- a/.github/workflows/nvidia-tests.yaml +++ b/.github/workflows/nvidia-rtx-3090-tests.yaml @@ -1,10 +1,12 @@ name: nvidia-rtx-3090 tests on: - push: - branches: [ develop ] - pull_request: - branches: [ develop ] + workflow_dispatch: + workflow_call: + +concurrency: + group: unit_tests-${{github.ref}}-${{github.event.pull_request.number || github.run_number}} + cancel-in-progress: true jobs: inter-layer: @@ -13,7 +15,8 @@ jobs: strategy: matrix: ginter: [ 1, 2 ] - memopt: [ '0', '1' ] + memopt: [ '0', '1' ] + steps: - uses: actions/checkout@v3 - name: Install AxoNN @@ -36,6 +39,7 @@ jobs: intra-layer: runs-on: [ nvidia ] + steps: - uses: actions/checkout@v3 - name: Install AxoNN