Merge branch 'next' #479
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
| name: Continuous Integration | |
| on: | |
| workflow_dispatch: | |
| push: | |
| branches: ["main"] | |
| pull_request: | |
| branches: ["main"] | |
| env: | |
| CARGO_TERM_COLOR: always | |
| permissions: | |
| contents: read | |
| pages: write | |
| id-token: write | |
| concurrency: | |
| group: "pages" | |
| cancel-in-progress: true | |
| jobs: | |
| build: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: π₯ Checkout repository | |
| uses: actions/checkout@v4 | |
| - name: π§° Setup Pages | |
| uses: actions/configure-pages@v5 | |
| - name: π§° Install Aiken | |
| uses: aiken-lang/setup-aiken@v1 | |
| with: | |
| version: v1.1.19 | |
| - name: π Run fmt | |
| run: aiken fmt --check | |
| - name: π¬ Run tests | |
| run: aiken check | |
| docs: | |
| strategy: | |
| matrix: | |
| include: | |
| - stdlib_version: v1.9.0 | |
| legacy_aiken_setup: true | |
| aiken_version: v1.0.29-alpha | |
| runner: ubuntu-22.04 | |
| - stdlib_version: v2.0.0 | |
| legacy_aiken_setup: true | |
| aiken_version: v1.1.2 | |
| - stdlib_version: v2.1.0 | |
| - stdlib_version: v2.2.0 | |
| - stdlib_version: v2.2.1 | |
| - stdlib_version: v3.0.0 | |
| - stdlib_version: "" | |
| runs-on: ${{ matrix.runner || 'ubuntu-latest' }} | |
| steps: | |
| - name: π₯ Checkout repository | |
| uses: actions/checkout@v4 | |
| with: | |
| ref: ${{ matrix.stdlib_version }} | |
| - name: π§° Setup Pages | |
| uses: actions/configure-pages@v5 | |
| - name: π§° Install Aiken (legacy) | |
| if: ${{ matrix.legacy_aiken_setup }} | |
| uses: aiken-lang/setup-aiken@v1.0.2 | |
| with: | |
| version: ${{ matrix.aiken_version || 'v1.1.19' }} | |
| - name: π§° Install Aiken | |
| if: ${{ !matrix.legacy_aiken_setup }} | |
| uses: aiken-lang/setup-aiken@v1 | |
| with: | |
| version: ${{ matrix.aiken_version || 'v1.1.19' }} | |
| - name: π Generate documentation | |
| shell: bash | |
| working-directory: . | |
| run: aiken docs -o docs/${{ matrix.stdlib_version }} | |
| # Make sure that the documentation for v2.2.0 points to v2.2.1 with the | |
| # warning comment about foldl2. | |
| - name: π Redirection page for v-less sub-directories | |
| if: ${{ matrix.stdlib_version == 'v2.2.0' }} | |
| shell: bash | |
| working-directory: docs | |
| run: | | |
| mkdir -p v2.2.0 | |
| cat > v2.2.0/index.html <<HTML | |
| <!DOCTYPE html> | |
| <html> | |
| <head> | |
| <title>Aiken StdLib API reference</title> | |
| <link rel="canonical" href="https://aiken-lang.github.io/stdlib"/> | |
| <meta name="robots" content="noindex"> | |
| <meta http-equiv="content-type" content="text/html; charset=utf-8"/> | |
| <meta http-equiv="refresh" content="0; url=/stdlib/v2.2.1"/> | |
| </head> | |
| </html> | |
| HTML | |
| mkdir -p 2.2.0 | |
| cat > 2.2.0/index.html <<HTML | |
| <!DOCTYPE html> | |
| <html> | |
| <head> | |
| <title>Aiken StdLib API reference</title> | |
| <link rel="canonical" href="https://aiken-lang.github.io/stdlib"/> | |
| <meta name="robots" content="noindex"> | |
| <meta http-equiv="content-type" content="text/html; charset=utf-8"/> | |
| <meta http-equiv="refresh" content="0; url=/stdlib/v2.2.1"/> | |
| </head> | |
| </html> | |
| HTML | |
| - name: π Redirection page for v-less sub-directories | |
| if: ${{ matrix.stdlib_version && matrix.stdlib_version != 'v2.2.0' }} | |
| shell: bash | |
| working-directory: docs | |
| run: | | |
| version=$(echo ${{matrix.stdlib_version}} | cut -c2-) | |
| mkdir -p $version | |
| cat > $version/index.html <<HTML | |
| <!DOCTYPE html> | |
| <html> | |
| <head> | |
| <title>Aiken StdLib API reference</title> | |
| <link rel="canonical" href="https://aiken-lang.github.io/stdlib"/> | |
| <meta name="robots" content="noindex"> | |
| <meta http-equiv="content-type" content="text/html; charset=utf-8"/> | |
| <meta http-equiv="refresh" content="0; url=/stdlib/${{ matrix.stdlib_version }}"/> | |
| </head> | |
| </html> | |
| HTML | |
| - name: π¦ Upload artifact | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: aiken-docs-${{ matrix.stdlib_version || 'latest' }} | |
| path: docs | |
| retention-days: 1 | |
| bundle-docs: | |
| runs-on: ubuntu-latest | |
| needs: [docs] | |
| steps: | |
| - name: π₯ Download all doc artifacts | |
| uses: actions/download-artifact@v5 | |
| with: | |
| pattern: aiken-docs-* | |
| merge-multiple: true | |
| - name: π¦ Upload artifact | |
| uses: actions/upload-pages-artifact@v4 | |
| with: | |
| path: . | |
| deploy-docs: | |
| needs: [bundle-docs] | |
| runs-on: ubuntu-latest | |
| environment: | |
| name: github-pages | |
| url: ${{ steps.deployment.outputs.page_url }} | |
| steps: | |
| - name: π Deploy to GitHub Pages | |
| id: deployment | |
| uses: actions/deploy-pages@v4 |