diff options
| author | J08nY | 2021-04-22 19:24:25 +0200 |
|---|---|---|
| committer | J08nY | 2021-04-22 19:24:25 +0200 |
| commit | 4e555b4e86651c59d803dfbea60dc4d1dba240e5 (patch) | |
| tree | be335bce8f4d849758b40d8bc68777b8ee2c5d66 /.github/workflows | |
| parent | 3e1aefd54ed04787d6ef8b8648b582e563554819 (diff) | |
| parent | 393513fdc5d607446c3f50544942a40cad2c06c3 (diff) | |
| download | ecgen-4e555b4e86651c59d803dfbea60dc4d1dba240e5.tar.gz ecgen-4e555b4e86651c59d803dfbea60dc4d1dba240e5.tar.zst ecgen-4e555b4e86651c59d803dfbea60dc4d1dba240e5.zip | |
Diffstat (limited to '.github/workflows')
| -rw-r--r-- | .github/workflows/release.yml | 39 | ||||
| -rw-r--r-- | .github/workflows/test.yml | 44 |
2 files changed, 83 insertions, 0 deletions
diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml new file mode 100644 index 0000000..2f3339e --- /dev/null +++ b/.github/workflows/release.yml @@ -0,0 +1,39 @@ +name: Release + +on: + push: + tags: + - '*' + +jobs: + test: + runs-on: ubuntu-20.04 + steps: + - uses: actions/checkout@v2 + with: + submodules: true + - name: Setup gcc + run: | + sudo apt-get update + sudo apt-get install -y gcc dpkg apt + - name: Setup pari + run: | + wget -q https://mirrors.edge.kernel.org/ubuntu/pool/universe/p/pari/libpari-gmp-tls7_2.13.1-1_amd64.deb + wget -q https://mirrors.edge.kernel.org/ubuntu/pool/universe/p/pari/libpari-dev_2.13.1-1_amd64.deb + wget -q https://mirrors.edge.kernel.org/ubuntu/pool/universe/p/pari/pari-gp_2.13.1-1_amd64.deb + wget -q https://mirrors.edge.kernel.org/ubuntu/pool/main/r/readline/libreadline8_8.0-4_amd64.deb + wget -q https://mirrors.edge.kernel.org/ubuntu/pool/main/n/ncurses/libtinfo6_6.2-1_amd64.deb + wget -q https://pari.math.u-bordeaux.fr/pub/pari/packages/seadata.tgz + sudo dpkg --force-all -i libtinfo6_6.2-1_amd64.deb libreadline8_8.0-4_amd64.deb libpari-gmp-tls7_2.13.1-1_amd64.deb libpari-dev_2.13.1-1_amd64.deb pari-gp_2.13.1-1_amd64.deb + DATADIR=$(echo "default(datadir)" | gp -q | cut -d\" -f2) + sudo tar --strip-components=1 -C ${DATADIR} -xzf seadata.tgz data/ + - name: Build + run: | + make + strip ecgen + - name: Release + uses: softprops/action-gh-release@v1 + with: + files: ecgen + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml new file mode 100644 index 0000000..29e7823 --- /dev/null +++ b/.github/workflows/test.yml @@ -0,0 +1,44 @@ +name: Test + +on: [push, pull_request] + +jobs: + test: + runs-on: ubuntu-20.04 + strategy: + matrix: + CC: [gcc, clang] + env: + CC: ${{ matrix.CC }} + steps: + - uses: actions/checkout@v2 + with: + submodules: true + - name: Setup ${{ matrix.CC }} + run: | + sudo apt-get update + sudo apt-get install -y $CC dpkg apt + - name: Setup pari + run: | + wget -q https://mirrors.edge.kernel.org/ubuntu/pool/universe/p/pari/libpari-gmp-tls7_2.13.1-1_amd64.deb + wget -q https://mirrors.edge.kernel.org/ubuntu/pool/universe/p/pari/libpari-dev_2.13.1-1_amd64.deb + wget -q https://mirrors.edge.kernel.org/ubuntu/pool/universe/p/pari/pari-gp_2.13.1-1_amd64.deb + wget -q https://mirrors.edge.kernel.org/ubuntu/pool/main/r/readline/libreadline8_8.0-4_amd64.deb + wget -q https://mirrors.edge.kernel.org/ubuntu/pool/main/n/ncurses/libtinfo6_6.2-1_amd64.deb + wget -q https://pari.math.u-bordeaux.fr/pub/pari/packages/seadata.tgz + sudo dpkg --force-all -i libtinfo6_6.2-1_amd64.deb libreadline8_8.0-4_amd64.deb libpari-gmp-tls7_2.13.1-1_amd64.deb libpari-dev_2.13.1-1_amd64.deb pari-gp_2.13.1-1_amd64.deb + DATADIR=$(echo "default(datadir)" | gp -q | cut -d\" -f2) + sudo tar --strip-components=1 -C ${DATADIR} -xzf seadata.tgz data/ + - name: Test + run: | + TEST=1 make unittest + - name: Code coverage + if: ${{ matrix.CC == 'gcc' }} + run: | + cd src && find . -name "*.gcda" -exec gcov -pb "{}" +; + - name: Code coverage upload + uses: codecov/codecov-action@v1 + if: ${{ matrix.CC == 'gcc' }} + with: + env_vars: CC + functionalities: gcov |
