git.iko.soy/typeable/libphonenumber
on main help sign in
Add CI
commitda80274dfcaefcd56c3f6051b5c56983c00eb908 authormniip <mniip@mniip.com> dateTue 21 Mar 2023, 12:02 (4 years ago) parenta64398c
2 files changed+85−1
.github/workflows/ci.yaml+84 libphonenumber.cabal+1−1
.github/workflows/ci.yamlnew file+84
@@ -0,0 +1,84 @@
1+name: CI
2+
3+on:
4+ push:
5+ branches:
6+ - "*"
7+ pull_request:
8+ branches:
9+ - "*"
10+ release:
11+ types:
12+ - prereleased
13+
14+jobs:
15+ build:
16+ strategy:
17+ matrix:
18+ platform:
19+ - ubuntu-latest
20+ ghc_version:
21+ - "8.6.5"
22+ - "8.8.4"
23+ - "8.10.7"
24+ - "9.0.2"
25+ - "9.2.7"
26+ - "9.4.4"
27+ - "9.6.1"
28+ fail-fast: false
29+ name: Build on Linux, GHC ${{ matrix.ghc_version }}
30+ runs-on: ${{ matrix.platform }}
31+ steps:
32+ - uses: actions/checkout@v3
33+ - uses: haskell/actions/setup@v2
34+ with:
35+ ghc-version: ${{ matrix.ghc_version }}
36+ cabal-version: "3.10.1.0"
37+ - name: install C++ library
38+ run: |
39+ sudo apt-get update
40+ sudo apt-get install -y libphonenumber-dev
41+
42+ - name: cabal sdist
43+ run: cabal sdist --output-dir "$GITHUB_WORKSPACE/sdist"
44+ - name: unpack
45+ run: |
46+ mkdir -p "$GITHUB_WORKSPACE/unpacked"
47+ find "$GITHUB_WORKSPACE/sdist" -maxdepth 1 -type f -name '*.tar.gz' -exec tar -C "$GITHUB_WORKSPACE/unpacked" -xzvf {} \;
48+ echo "PKGDIR_libphonenumber=$(find "$GITHUB_WORKSPACE/unpacked" -maxdepth 1 -type d -regex '.*/libphonenumber-[0-9.]*')" >> "$GITHUB_ENV"
49+ - name: cabal configure
50+ run: cd "$PKGDIR_libphonenumber" && cabal configure --with-ghc=ghc-${{ matrix.ghc_version }}
51+ - name: install dependencies
52+ run: cd "$PKGDIR_libphonenumber" && cabal build --dependencies-only --enable-tests --haddock-all
53+ - name: cabal build
54+ run: cd "$PKGDIR_libphonenumber" && cabal build --ghc-options=-Werror
55+ - name: cabal test spec_test
56+ run: cd "$PKGDIR_libphonenumber" && cabal test spec_test
57+ - name: cabal check
58+ run: cd "$PKGDIR_libphonenumber" && cabal check
59+ - name: cabal haddock
60+ run: cd "$PKGDIR_libphonenumber" && cabal haddock
61+
62+ dist:
63+ needs: build
64+ runs-on: ubuntu-latest
65+ name: Build source tarball
66+ if: github.event_name == 'release'
67+ steps:
68+ - uses: actions/checkout@v3
69+ - uses: haskell/actions/setup@v2
70+ with:
71+ cabal-version: "3.10.1.0"
72+ - name: cabal sdist
73+ run: |
74+ cabal sdist --output-dir "$GITHUB_WORKSPACE/sdist"
75+ echo "dist=$(find "$GITHUB_WORKSPACE/sdist" -maxdepth 1 -type f -name '*.tar.gz')" >> "$GITHUB_ENV"
76+ - uses: actions/upload-artifact@v2
77+ with:
78+ name: Source tarball
79+ path: ${{ env.dist }}
80+ - uses: svenstaro/upload-release-action@2.2.1
81+ with:
82+ repo_token: ${{ secrets.GITHUB_TOKEN }}
83+ file: ${{ env.dist }}
84+ tag: ${{ github.ref }}
libphonenumber.cabal+1−1
@@ -50,7 +50,7 @@ library
5050 Data.PhoneNumber.Internal.Number
5151 Data.PhoneNumber.Internal.Util
5252 build-depends:
53− base >= 4.12 && < 4.18
53+ base >= 4.12 && < 4.19
5454 , bytestring
5555 , containers
5656 , deepseq