Skip to content

Commit

Permalink
first cut at API checking
Browse files Browse the repository at this point in the history
API files should be initialized now, modulo stray BOMs.
  • Loading branch information
geekosaur committed Aug 16, 2024
1 parent 5d517c2 commit 1c897e7
Show file tree
Hide file tree
Showing 5 changed files with 19,741 additions and 3 deletions.
16 changes: 13 additions & 3 deletions .github/workflows/check-api.yml
Original file line number Diff line number Diff line change
Expand Up @@ -47,17 +47,15 @@ jobs:

# I was going to use the canned action, but it only supports a single package and reinstalls the same binary each time
- name: Install print-api
shell: bash
run: |
wget -q https://github.com/Kleidukos/print-api/releases/download/v0.1.0.1/print-api-0.1.0.1-Linux-static-${{ matrix.ghc }}-x86_64.tar.gz
tar -xzvf print-api-0.1.0.1-Linux-static-${{ matrix.ghc }}-x86_64.tar.gz
chmod +x print-api
# print-api needs environment files. It also doesn't make a lot of sense to use the cached builds, sadly,
# since they're special in different ways (bootstrap and validate) and we want a vanulla build. And there
# since they're special in different ways (bootstrap and validate) and we want a vanilla build. And there
# isn't enough cache space to make a third cache, even though this is a very limited build.
- name: Build Cabal with environment files
shell: bash
run: cabal build Cabal-syntax Cabal --write-ghc-environment-files=always --project-file=cabal.release.project

- name: Check Cabal-syntax and Cabal APIs
Expand All @@ -66,3 +64,15 @@ jobs:
./print-api --package-name Cabal > Cabal.api
diff Cabal-syntax.api Cabal-syntax/Cabal-syntax-${{ matrix.ghc }}-${{ matrix.sys.os }}.api
diff Cabal.api Cabal/Cabal-${{ matrix.ghc }}-${{ matrix.sys.os }}.api
# for convenience, since large changes would be a pain to reconstruct from diffs and
# contributors aren't guaranteed to have ubuntu-latest handy
- uses: actions/upload-artifact@v3
with:
name: Cabal-syntax.api
path: Cabal-syntax.api

- uses: actions/upload-artifact@v3
with:
name: Cabal.api
path: Cabal.api
Loading

0 comments on commit 1c897e7

Please sign in to comment.