diff --git a/.clabot b/.clabot index a049f5a8..fa8e8b23 100644 --- a/.clabot +++ b/.clabot @@ -11,7 +11,11 @@ "mamonet": "", "emillon": "", "protz": "", - "ma-ilsi": "" + "ma-ilsi": "", + "xvzcf": "Cryspen", + "msprotz": "Microsoft", + "R1kM": "Inria", + "samuel-lee-msft": "Microsoft" }, "contributors": [ "franziskuskiefer", @@ -25,6 +29,10 @@ "mamonet", "emillon", "protz", - "ma-ilsi" + "ma-ilsi", + "xvzcf", + "msprotz", + "R1kM", + "samuel-lee-msft" ] } diff --git a/.github/workflows/gh-pages.yml b/.github/workflows/gh-pages.yml index 8396545c..8f023e77 100644 --- a/.github/workflows/gh-pages.yml +++ b/.github/workflows/gh-pages.yml @@ -1,29 +1,16 @@ -name: Deploy static content to GitHub Pages +name: Build & Deploy static content to GitHub Pages on: push: branches: ["main"] + pull_request: workflow_dispatch: -# Sets permissions of the GITHUB_TOKEN to allow deployment to GitHub Pages -permissions: - contents: read - pages: write - id-token: write - -# Allow one concurrent deployment -concurrency: - group: "pages" - cancel-in-progress: true - jobs: - # Single deploy job since we're just deploying - deploy: - environment: - name: github-pages - url: ${{ steps.deployment.outputs.page_url }} - runs-on: ubuntu-22.04 + build: + # build on macos until bindgen is fixed + runs-on: macos-latest steps: - name: Checkout uses: actions/checkout@v3 @@ -34,20 +21,17 @@ jobs: run: git fetch --tags origin - name: Setup | mdBook | 1/2 - uses: hecrj/setup-rust-action@8708beccd22540a3f955ae10cc884af27ca81bf5 + uses: hecrj/setup-rust-action@f344d1a51e8ad6e1c6c51d9cf8d5a6edf4cfd230 - name: Setup | mdBook | 2/2 uses: peaceiris/actions-mdbook@4b5ef36b314c2599664ca107bb8c02412548d79d with: mdbook-version: "latest" - - name: Setup | Update - run: sudo apt-get update - - name: Setup | System run: | - sudo apt-get install doxygen python3-sphinx libgmp-dev ninja-build nodejs - sudo pip install --upgrade pip + brew install doxygen sphinx-doc gmp ninja node + pip install --upgrade pip - name: Setup | OCaml | 1/2 uses: ocaml/setup-ocaml@v2 @@ -62,14 +46,16 @@ jobs: run: | npm install -g jsdoc + - name: Setup | Python + uses: actions/setup-python@v5 + with: + python-version: '3.12' + - name: Setup | Sphinx run: | cd docs/reference pip install -r requirements.txt - - name: Setup | Pages - uses: actions/configure-pages@v2 - - name: Build | Book run: | # We `cd` into this directory first because the book @@ -144,6 +130,25 @@ jobs: with: path: "build" + deploy: + if: ${{ github.ref == 'refs/heads/main' }} + needs: build + environment: + name: github-pages + url: ${{ steps.deployment.outputs.page_url }} + runs-on: ubuntu-22.04 + # Sets permissions of the GITHUB_TOKEN to allow deployment to GitHub Pages + permissions: + contents: read + pages: write + id-token: write + # Allow one concurrent deployment + concurrency: + group: "pages" + cancel-in-progress: true + steps: + - name: Setup | Pages + uses: actions/configure-pages@v2 - name: Deploy to GitHub Pages id: deployment uses: actions/deploy-pages@v1 diff --git a/libcrux/include/eurydice_glue.h b/libcrux/include/eurydice_glue.h index c8b0825d..a0f8eff8 100644 --- a/libcrux/include/eurydice_glue.h +++ b/libcrux/include/eurydice_glue.h @@ -123,11 +123,11 @@ typedef struct { // use it to peform manual offset computations rather than going through the macros. static inline Eurydice_slice chunk_next(Eurydice_chunks *chunks, size_t element_size) { size_t chunk_size = chunks->slice.len >= chunks->chunk_size ? chunks->chunk_size : chunks->slice.len; - Eurydice_slice curr_chunk = ((Eurydice_slice) { .ptr = chunks->slice.ptr, .len = chunk_size }); - chunks->slice = ((Eurydice_slice) { - .ptr = (char *)(chunks->slice.ptr) + chunk_size * element_size, - .len = chunks->slice.len - chunk_size - }); + Eurydice_slice curr_chunk; + curr_chunk.ptr = chunks->slice.ptr; + curr_chunk.len = chunk_size; + chunks->slice.ptr = (char *)(chunks->slice.ptr) + chunk_size * element_size; + chunks->slice.len = chunks->slice.len - chunk_size; return curr_chunk; }