smp server: do not open/read journal message queues that are known to be empty #8158
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: build | |
on: | |
push: | |
branches: | |
- master | |
- stable | |
tags: | |
- "v*" | |
pull_request: | |
jobs: | |
build: | |
name: build-${{ matrix.os }}-${{ matrix.ghc }} | |
runs-on: ${{ matrix.os }} | |
strategy: | |
fail-fast: false | |
matrix: | |
include: | |
- os: ubuntu-20.04 | |
platform_name: 20_04-x86-64 | |
ghc: "8.10.7" | |
- os: ubuntu-20.04 | |
platform_name: 20_04-x86-64 | |
ghc: "9.6.3" | |
- os: ubuntu-22.04 | |
platform_name: 22_04-x86-64 | |
ghc: "9.6.3" | |
steps: | |
- name: Clone project | |
uses: actions/checkout@v3 | |
- name: Setup Haskell | |
uses: haskell-actions/setup@v2 | |
with: | |
ghc-version: ${{ matrix.ghc }} | |
cabal-version: "3.10.1.0" | |
- name: Cache dependencies | |
uses: actions/cache@v2 | |
with: | |
path: | | |
~/.cabal/store | |
dist-newstyle | |
key: ${{ matrix.os }}-${{ hashFiles('cabal.project', 'simplexmq.cabal') }} | |
- name: Build | |
shell: bash | |
run: cabal build --enable-tests | |
- name: Test | |
timeout-minutes: 40 | |
shell: bash | |
run: cabal test --test-show-details=direct | |
- name: Prepare binaries | |
if: startsWith(github.ref, 'refs/tags/v') | |
shell: bash | |
run: | | |
mv $(cabal list-bin smp-server) smp-server-ubuntu-${{ matrix.platform_name}} | |
mv $(cabal list-bin ntf-server) ntf-server-ubuntu-${{ matrix.platform_name}} | |
mv $(cabal list-bin xftp-server) xftp-server-ubuntu-${{ matrix.platform_name}} | |
mv $(cabal list-bin xftp) xftp-ubuntu-${{ matrix.platform_name}} | |
- name: Build changelog | |
if: startsWith(github.ref, 'refs/tags/v') | |
id: build_changelog | |
uses: mikepenz/release-changelog-builder-action@v1 | |
with: | |
configuration: .github/changelog_conf.json | |
failOnError: true | |
ignorePreReleases: true | |
commitMode: true | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
- name: Create release | |
if: startsWith(github.ref, 'refs/tags/v') && matrix.ghc != '8.10.7' | |
uses: softprops/action-gh-release@v1 | |
with: | |
body: | | |
See full changelog [here](https://github.com/simplex-chat/simplexmq/blob/master/CHANGELOG.md). | |
Commits: | |
${{ steps.build_changelog.outputs.changelog }} | |
prerelease: true | |
files: | | |
LICENSE | |
smp-server-ubuntu-${{ matrix.platform_name}} | |
ntf-server-ubuntu-${{ matrix.platform_name}} | |
xftp-server-ubuntu-${{ matrix.platform_name}} | |
xftp-ubuntu-${{ matrix.platform_name}} | |
fail_on_unmatched_files: true | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} |