diff options
author | itchyny <itchyny@cybozu.co.jp> | 2023-07-03 21:05:21 +0900 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-07-03 21:05:21 +0900 |
commit | 3847ebb699e6d099711fe12bf421cd9029b461ed (patch) | |
tree | 7b22f4ccebf08918d2d7ca9953d187107f256abd | |
parent | 3c76a5b3f3b9ffa874c75939f140a1aad81da9b5 (diff) |
Create dist and upload on release also disable docs on build (#2648)
-rw-r--r-- | .github/workflows/ci.yml | 75 | ||||
-rw-r--r-- | .github/workflows/scanbuild.yml | 2 | ||||
-rw-r--r-- | .gitignore | 2 | ||||
-rw-r--r-- | README.md | 2 |
4 files changed, 52 insertions, 29 deletions
diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 5cc5363e..2a5aa92f 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -39,28 +39,23 @@ jobs: - name: Install packages run: | sudo apt-get update -qq - sudo apt-get install -y \ - automake \ - autoconf \ - bison \ - flex \ - gdb \ - python3 + sudo apt-get install -y automake autoconf - name: Build run: | - autoreconf -fi + autoreconf -i ./configure --disable-dependency-tracking \ --disable-silent-rules \ + --disable-docs \ --disable-maintainer-mode \ --disable-valgrind \ --with-oniguruma=builtin \ - ${{ matrix.configure_flag }} \ - YACC="$(which bison) -y" + ${{ matrix.configure_flag }} make strip jq - name: Test run: | make check + git diff --exit-code - name: Upload Test Logs if: ${{ failure() }} uses: actions/upload-artifact@v3 @@ -97,28 +92,24 @@ jobs: run: | # brew update sometimes fails with "Fetching /usr/local/Homebrew/Library/Taps/homebrew/homebrew-cask failed!" brew update || brew update-reset - brew install \ - autoconf \ - automake \ - libtool \ - flex \ - bison + brew install autoconf automake libtool - name: Build run: | - autoreconf -fi + autoreconf -i ./configure --disable-dependency-tracking \ --disable-silent-rules \ + --disable-docs \ --disable-maintainer-mode \ --disable-valgrind \ --with-oniguruma=builtin \ --enable-static \ - --enable-all-static \ - YACC="$(brew --prefix)/opt/bison/bin/bison -y" + --enable-all-static make strip jq - name: Test run: | make check + git diff --exit-code - name: Upload Test Logs if: ${{ failure() }} uses: actions/upload-artifact@v3 @@ -161,27 +152,26 @@ jobs: autoconf automake libtool - bison - flex - name: Build shell: msys2 {0} run: | - autoreconf -fi + autoreconf -i ./configure --disable-dependency-tracking \ --disable-silent-rules \ + --disable-docs \ --disable-maintainer-mode \ --disable-valgrind \ --with-oniguruma=builtin \ --disable-shared \ --enable-static \ - --enable-all-static \ - YACC="$(which bison) -y" + --enable-all-static make strip jq.exe - name: Test shell: msys2 {0} run: | make check + git diff --exit-code --ignore-submodules - name: Upload Test Logs if: ${{ failure() }} uses: actions/upload-artifact@v3 @@ -199,17 +189,47 @@ jobs: retention-days: 7 path: jq.exe + dist: + runs-on: ubuntu-latest + steps: + - name: Clone repository + uses: actions/checkout@v3 + with: + submodules: true + - name: Install packages + run: | + sudo apt-get update -qq + sudo apt-get install -y automake autoconf + - name: Create dist + run: | + autoreconf -i + ./configure --disable-dependency-tracking \ + --disable-silent-rules \ + --disable-docs \ + --disable-maintainer-mode \ + --disable-valgrind \ + --with-oniguruma=builtin + make dist dist-zip + git diff --exit-code + - name: Upload Artifacts + uses: actions/upload-artifact@v3 + with: + name: jq-dist + if-no-files-found: error + retention-days: 7 + path: | + jq-*.tar.gz + jq-*.zip + release: runs-on: ubuntu-latest permissions: contents: write - needs: [linux, macos, windows] + needs: [linux, macos, windows, dist] if: startsWith(github.event.ref, 'refs/tags/v') steps: - name: Clone repository uses: actions/checkout@v3 - with: - submodules: true - name: Merge built artifacts uses: actions/download-artifact@v3 with: @@ -223,6 +243,7 @@ jobs: cp artifacts/jq-linux-ubuntu-22.04-gcc/jq release/jq-linux-amd64 cp artifacts/jq-macos-macos-13-gcc/jq release/jq-macos-amd64 cp artifacts/jq-windows-windows-2022-gcc/jq.exe release/jq-windows-amd64.exe + cp artifacts/jq-dist/jq-* release/ gh release create $TAG_NAME --draft --title "jq ${TAG_NAME#v}" --generate-notes gh release upload $TAG_NAME --clobber release/jq-* diff --git a/.github/workflows/scanbuild.yml b/.github/workflows/scanbuild.yml index c3947566..fba03c64 100644 --- a/.github/workflows/scanbuild.yml +++ b/.github/workflows/scanbuild.yml @@ -48,7 +48,7 @@ jobs: CC: ${{ matrix.compiler }} MAKEVARS: ${{ matrix.makevars }} run: | - autoreconf -fi + autoreconf -i rm src/lexer.c src/lexer.h rm src/parser.c src/parser.h ./configure --with-oniguruma=builtin YACC="$(which bison) -y" $COVERAGE @@ -15,6 +15,8 @@ tags jq !tests/modules/lib/jq/ jq.1 +jq-*.tar.gz +jq-*.zip # Generated source src/builtin.inc @@ -28,7 +28,7 @@ git submodule as per the instructions below. (note that jq's tests require regexp support to pass). To build, run: git submodule update --init # if building from git to get oniguruma - autoreconf -fi # if building from git + autoreconf -i # if building from git ./configure --with-oniguruma=builtin make -j8 make check |