diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index daf50fd1..999880fa 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -14,116 +14,97 @@ on: workflow_dispatch: jobs: - cabal: - strategy: - fail-fast: false - matrix: - ghc: - - "9.4.8" - - "9.6.3" - - "9.8.1" - os: - - "macos-latest" - - "ubuntu-latest" - runs-on: ${{ matrix.os }} - steps: - - uses: actions/checkout@v4 - - - uses: haskell-actions/setup@v2 - with: - ghc-version: ${{ matrix.ghc }} - - - name: Configure - run: cabal configure --enable-tests --ghc-options -Werror - - - name: Compile - run: cabal build lib:shrun - - - name: Unit Tests - run: cabal test unit --test-options '--hedgehog-tests 100000' - - - name: Integration Tests - run: cabal test integration - - - name: Functional Tests - run: cabal test functional - - - name: Benchmarks - if: ${{ matrix.os == 'ubuntu-latest' }} - id: bench - run: | - cabal bench --benchmark-options ' - --csv benchmarks/${{ matrix.os }}_${{ matrix.ghc }}_ci.csv - --svg benchmarks/${{ matrix.os }}_${{ matrix.ghc }}_ci.svg - --baseline benchmarks/baseline_${{ matrix.os }}_${{ matrix.ghc }}_ci.csv - --fail-if-slower 50 - --fail-if-faster 50' - - - uses: actions/upload-artifact@v3 - if: ${{ failure() && steps.bench.conclusion == 'failure' }} - with: - name: build-artifacts - path: | - benchmarks/${{ matrix.os }}_${{ matrix.ghc }}_ci.csv - benchmarks/${{ matrix.os }}_${{ matrix.ghc }}_ci.svg - nix: - strategy: - fail-fast: false - matrix: - os: - - "macos-latest" - - "ubuntu-latest" - runs-on: ${{ matrix.os }} - steps: - - uses: actions/checkout@v4 - - - name: Setup nix - uses: cachix/install-nix-action@v25 - with: - github_access_token: ${{ secrets.GITHUB_TOKEN }} - nix_path: nixpkgs=channel:nixos-unstable - - - name: Compile & Test - run: | - set +e - - out=$(nix build 2>&1) - ec=$? - - regex=".*'(nix log \/nix\/store\/.*.drv)'.*" - - if [[ $ec -ne 0 ]]; then - if [[ $out =~ $regex ]]; then - echo echo "*** Regex match ***" - log_cmd="${BASH_REMATCH[1]}" - $log_cmd | cat - else - echo "*** No regex match on output ***" - echo $out - fi - fi - - exit $ec - lint: - runs-on: "ubuntu-latest" - steps: - - uses: actions/checkout@v4 - - - name: Setup nix - uses: cachix/install-nix-action@v25 - with: - github_access_token: ${{ secrets.GITHUB_TOKEN }} - nix_path: nixpkgs=channel:nixos-unstable - - - name: Formatting - run: | - nix run .#format - git diff --exit-code --color=always - - - name: HLint - run: nix run .#lint + # cabal: + # strategy: + # fail-fast: false + # matrix: + # ghc: + # - "9.4.8" + # - "9.6.3" + # - "9.8.1" + # os: + # - "macos-latest" + # - "ubuntu-latest" + # runs-on: ${{ matrix.os }} + # steps: + # - uses: actions/checkout@v4 + + # - uses: haskell-actions/setup@v2 + # with: + # ghc-version: ${{ matrix.ghc }} + + # - name: Configure + # run: cabal configure --enable-tests --ghc-options -Werror + + # - name: Compile + # run: cabal build lib:shrun + + # - name: Unit Tests + # run: cabal test unit --test-options '--hedgehog-tests 100000' + + # - name: Integration Tests + # run: cabal test integration + + # - name: Functional Tests + # run: cabal test functional + + # - name: Benchmarks + # if: ${{ matrix.os == 'ubuntu-latest' }} + # id: bench + # run: | + # cabal bench --benchmark-options ' + # --csv benchmarks/${{ matrix.os }}_${{ matrix.ghc }}_ci.csv + # --svg benchmarks/${{ matrix.os }}_${{ matrix.ghc }}_ci.svg + # --baseline benchmarks/baseline_${{ matrix.os }}_${{ matrix.ghc }}_ci.csv + # --fail-if-slower 50 + # --fail-if-faster 50' + + # - uses: actions/upload-artifact@v3 + # if: ${{ failure() && steps.bench.conclusion == 'failure' }} + # with: + # name: build-artifacts + # path: | + # benchmarks/${{ matrix.os }}_${{ matrix.ghc }}_ci.csv + # benchmarks/${{ matrix.os }}_${{ matrix.ghc }}_ci.svg + # nix: + # strategy: + # fail-fast: false + # matrix: + # os: + # - "macos-latest" + # - "ubuntu-latest" + # runs-on: ${{ matrix.os }} + # steps: + # - uses: actions/checkout@v4 + + # - name: Setup nix + # uses: cachix/install-nix-action@v25 + # with: + # github_access_token: ${{ secrets.GITHUB_TOKEN }} + # nix_path: nixpkgs=channel:nixos-unstable + + # - name: Compile & Test + # run: nix build -L + # lint: + # runs-on: "ubuntu-latest" + # steps: + # - uses: actions/checkout@v4 + + # - name: Setup nix + # uses: cachix/install-nix-action@v25 + # with: + # github_access_token: ${{ secrets.GITHUB_TOKEN }} + # nix_path: nixpkgs=channel:nixos-unstable + + # - name: Formatting + # run: | + # nix run .#format + # git diff --exit-code --color=always + + # - name: HLint + # run: nix run .#lint release: - needs: [cabal, nix, lint] + #needs: [cabal, nix, lint] if: github.ref == 'refs/heads/release' strategy: fail-fast: false @@ -144,13 +125,15 @@ jobs: - name: Configure run: cabal configure --enable-tests --ghc-options -Werror - - name: Compile - run: cabal build exe:shrun - - name: Install binary run: | - cabal install --installdir=. --install-method=copy --program-suffix=-${{ matrix.os }} - ls + set +e + uname -a + uname -m + uname -o + #cabal install --installdir=. --install-method=copy --program-suffix=-${{ matrix.os }} + cabal install --installdir=. --install-method=copy --program-suffix=-${{ matrix.os }} --enable-executable-static + ldd shrun-${{ matrix.os }} - name: Upload binary uses: actions/upload-artifact@v3