Implement laws-based testing framework for vector operations #663
This file contains hidden or 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
| # This file was automatically generated by sbt-github-actions using the | |
| # githubWorkflowGenerate task. You should add and commit this file to | |
| # your git repository. It goes without saying that you shouldn't edit | |
| # this file by hand! Instead, if you wish to make changes, you should | |
| # change your sbt build configuration to revise the workflow description | |
| # to meet your needs, then regenerate this file. | |
| name: Continuous Integration | |
| on: | |
| pull_request: | |
| branches: ['**', '!update/**', '!pr/**'] | |
| push: | |
| branches: [main] | |
| tags: [v*] | |
| env: | |
| GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
| concurrency: | |
| group: ${{ github.workflow }} @ ${{ github.ref }} | |
| cancel-in-progress: true | |
| jobs: | |
| build: | |
| name: Build and Test | |
| strategy: | |
| matrix: | |
| os: [ubuntu-latest] | |
| scala: [3] | |
| java: [temurin@17] | |
| project: [js, jvm, native] | |
| runs-on: ${{ matrix.os }} | |
| timeout-minutes: 60 | |
| steps: | |
| - name: Checkout current branch (full) | |
| uses: actions/checkout@v4 | |
| with: | |
| fetch-depth: 0 | |
| - uses: coursier/setup-action@main | |
| with: | |
| jvm: temurin@17 | |
| apps: scala-cli | |
| - name: Setup NodeJS v18 LTS | |
| if: matrix.project == 'js' | |
| uses: actions/setup-node@v3 | |
| with: | |
| node-version: 20 | |
| cache: npm | |
| - name: formatCheck | |
| run: | | |
| echo "Before format:" | |
| git status | |
| ./mill mill.scalalib.scalafmt.ScalafmtModule/reformatAll __.sources | |
| echo "After format:" | |
| git diff --name-only | |
| echo "Differences:" | |
| git diff | |
| ./mill mill.scalalib.scalafmt.ScalafmtModule/checkFormatAll __.sources | |
| - if: matrix.project == 'js' | |
| run: npm install | |
| - if: matrix.project == 'native' | |
| run: sudo apt-get install -y libatlas-base-dev | |
| - name: scalaJSLink | |
| if: matrix.project == 'js' | |
| run: ./mill vecxt.${{ matrix.project }}.fastLinkJS | |
| - name: nativeLink | |
| if: matrix.project == 'native' | |
| run: ./mill vecxt.${{ matrix.project }}.test.nativeLink | |
| - name: Test | |
| run: ./mill vecxt.${{ matrix.project }}.test | |
| - name: Laws Test | |
| run: ./mill laws.${{ matrix.project }}.test | |
| - name: Doc Gen | |
| run: ./mill site.siteGen | |
| publish: | |
| if: github.repository == 'Quafadas/vecxt' && contains(github.ref, 'refs/tags/') | |
| needs: build | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| with: | |
| fetch-depth: 0 | |
| fetch-tags: true | |
| - uses: coursier/setup-action@main | |
| with: | |
| jvm: temurin@17 | |
| apps: scala-cli | |
| - name: Publish to Maven Central | |
| run: ./mill mill.javalib.SonatypeCentralPublishModule/ | |
| env: | |
| MILL_PGP_PASSPHRASE: ${{ secrets.PGP_PASSPHRASE }} | |
| MILL_PGP_SECRET_BASE64: ${{ secrets.PGP_SECRET }} | |
| MILL_SONATYPE_PASSWORD: ${{ secrets.SONATYPE_PASSWORD }} | |
| MILL_SONATYPE_USERNAME: ${{ secrets.SONATYPE_USERNAME }} | |
| site: | |
| needs: build | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: coursier/setup-action@main | |
| with: | |
| jvm: temurin@17 | |
| apps: scala-cli | |
| - uses: actions/checkout@v4 | |
| with: | |
| fetch-depth: 0 | |
| fetch-tags: true | |
| ref: benchmark | |
| - name: Aggregate benchmark results | |
| run: | | |
| chmod +x aggregate.sh | |
| ./aggregate.sh | |
| - name: Switch to target branch | |
| run: | | |
| if [ "${{ github.event_name }}" = "pull_request" ]; then | |
| git fetch origin ${{ github.head_ref }} | |
| git checkout -f ${{ github.head_ref }} | |
| git reset --hard origin/${{ github.head_ref }} | |
| else | |
| git fetch origin main | |
| git checkout -f main | |
| git reset --hard origin/main | |
| fi | |
| ls | |
| - name: Copy benchmark results into docs generation | |
| run: mkdir -p site/docs/_assets/benchmarks && cp benchmark_history.json site/docs/_assets/benchmarks/benchmark_history.json | |
| - name: Generate static site | |
| run: ./mill site.siteGen | |
| - name: Setup Pages | |
| uses: actions/configure-pages@main | |
| - uses: actions/upload-artifact@main | |
| with: | |
| name: page | |
| path: out/site/laika/generateSite.dest | |
| if-no-files-found: error | |
| deploy: | |
| if: github.event_name != 'pull_request' && github.ref == 'refs/heads/main' | |
| needs: site | |
| permissions: | |
| pages: write | |
| id-token: write | |
| environment: | |
| name: github-pages | |
| url: ${{ steps.deployment.outputs.page_url }} | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/download-artifact@main | |
| with: | |
| name: page | |
| path: . | |
| - uses: actions/configure-pages@main | |
| - uses: actions/upload-pages-artifact@main | |
| with: | |
| path: . | |
| - name: Deploy to GitHub Pages | |
| id: deployment | |
| uses: actions/deploy-pages@main |