From 106dbf3b63ae56b856b379bcdb02a8ad80a285d5 Mon Sep 17 00:00:00 2001 From: Anton-Latukha Date: Sun, 29 Nov 2020 19:17:47 +0200 Subject: [PATCH 1/2] CI: GitHub: style clean-up M .github/workflows/Cabal-Linux.yml M .github/workflows/On-Readme-update.yml M .github/workflows/On-Release-Cabal-Linux.yml M .github/workflows/Optional-Nix-dev-env-macOS.yml M .github/workflows/Optional-Nix-dev-env-main.yml --- .github/workflows/Cabal-Linux.yml | 8 +++--- .github/workflows/On-Readme-update.yml | 6 ++--- .github/workflows/On-Release-Cabal-Linux.yml | 6 ++--- .../workflows/Optional-Nix-dev-env-macOS.yml | 8 +++--- .../workflows/Optional-Nix-dev-env-main.yml | 26 +++++++++---------- 5 files changed, 27 insertions(+), 27 deletions(-) diff --git a/.github/workflows/Cabal-Linux.yml b/.github/workflows/Cabal-Linux.yml index 94e91fd..2eacef0 100644 --- a/.github/workflows/Cabal-Linux.yml +++ b/.github/workflows/Cabal-Linux.yml @@ -12,7 +12,7 @@ on: jobs: build10: - name: GHC + name: "GHC" runs-on: ubuntu-latest strategy: matrix: @@ -21,7 +21,7 @@ jobs: - uses: actions/checkout@v2 with: submodules: recursive - - name: Cache of ~/.cabal/packages, ~/.cabal/store and dist-newstyle + - name: "Cache of ~/.cabal/packages, ~/.cabal/store and dist-newstyle" uses: actions/cache@v2 with: path: | @@ -32,10 +32,10 @@ jobs: - uses: actions/setup-haskell@v1 with: ghc-version: ${{ matrix.ghc }} - - name: Install additional system packages + - name: "Install additional system packages" run: sudo apt install libsodium-dev # 2020-08-01: NOTE: Nix instantiate still needed for HNix tests - - name: Install Nix + - name: "Install Nix" uses: cachix/install-nix-action@v12 - run: cabal v2-configure --disable-optimization --enable-tests --enable-deterministic - run: cabal v2-build diff --git a/.github/workflows/On-Readme-update.yml b/.github/workflows/On-Readme-update.yml index c35d8aa..a4baaf5 100644 --- a/.github/workflows/On-Readme-update.yml +++ b/.github/workflows/On-Readme-update.yml @@ -14,7 +14,7 @@ jobs: runs-on: ubuntu-latest continue-on-error: true steps: - - name: Install doctoc + - name: "Install doctoc" run: | sudo npm install -g doctoc - uses: actions/checkout@v2 @@ -22,10 +22,10 @@ jobs: # 2020-09-29: Official doc: # "In non-push events, such as pull_request, make sure to specify the ref to checkout:' ref: ${{ github.head_ref }} - - name: Generate the idenpotent TOC + - name: "Generate the idenpotent TOC" run: | doctoc --github --notitle README.md - - name: Commit and push changes + - name: "Commit and push changes" uses: stefanzweifel/git-auto-commit-action@v4 with: commit_author: "Anton Latukha " diff --git a/.github/workflows/On-Release-Cabal-Linux.yml b/.github/workflows/On-Release-Cabal-Linux.yml index 8dd3440..6a4faeb 100644 --- a/.github/workflows/On-Release-Cabal-Linux.yml +++ b/.github/workflows/On-Release-Cabal-Linux.yml @@ -8,7 +8,7 @@ on: jobs: build10: - name: GHC + name: "GHC" runs-on: ubuntu-latest strategy: matrix: @@ -29,10 +29,10 @@ jobs: - uses: actions/setup-haskell@v1 with: ghc-version: ${{ matrix.ghc }} - - name: Install additional system packages + - name: "Install additional system packages" run: sudo apt install libsodium-dev # 2020-08-01: NOTE: Nix instantiate still needed for HNix tests - - name: Install Nix + - name: "Install Nix" uses: cachix/install-nix-action@v12 - run: cabal v2-configure --disable-optimization --enable-tests --enable-deterministic - run: cabal v2-build diff --git a/.github/workflows/Optional-Nix-dev-env-macOS.yml b/.github/workflows/Optional-Nix-dev-env-macOS.yml index baf318f..3bdc589 100644 --- a/.github/workflows/Optional-Nix-dev-env-macOS.yml +++ b/.github/workflows/Optional-Nix-dev-env-macOS.yml @@ -24,18 +24,18 @@ jobs: runs-on: macos-latest continue-on-error: true steps: - - name: Git checkout + - name: "Git checkout" uses: actions/checkout@v2 with: submodules: recursive - - name: Install Nix + - name: "Install Nix" uses: cachix/install-nix-action@v12 with: nix_path: nixpkgs=channel:nixos-unstable - - name: Install Cachix + - name: "Install Cachix" uses: cachix/cachix-action@v7 with: name: ${{ env.cachixAccount }} signingKey: '${{ secrets.CACHIX_SIGNING_KEY }}' - - name: Determined Nix-build + - name: "Determined Nix-build" run: ./build.sh diff --git a/.github/workflows/Optional-Nix-dev-env-main.yml b/.github/workflows/Optional-Nix-dev-env-main.yml index 5ebd790..7a12bea 100644 --- a/.github/workflows/Optional-Nix-dev-env-main.yml +++ b/.github/workflows/Optional-Nix-dev-env-main.yml @@ -62,20 +62,20 @@ jobs: # 2020-08-01: NOTE: Due to Nixpkgs brittleness to not block project development Nixpkgs made optional, see commit message for more info continue-on-error: true steps: - - name: Git checkout + - name: "Git checkout" uses: actions/checkout@v2 with: submodules: recursive - - name: Install Nix + - name: "Install Nix" uses: cachix/install-nix-action@v12 with: nix_path: nixpkgs=channel:nixos-unstable - - name: Install Cachix + - name: "Install Cachix" uses: cachix/cachix-action@v7 with: name: ${{ env.cachixAccount }} signingKey: '${{ secrets.CACHIX_SIGNING_KEY }}' - - name: Determined Nix-build + - name: "Determined Nix-build" env: compiler: "default" buildStrictly: "true" @@ -87,20 +87,20 @@ jobs: runs-on: ubuntu-latest continue-on-error: true steps: - - name: Git checkout + - name: "Git checkout" uses: actions/checkout@v2 with: submodules: recursive - - name: Install Nix + - name: "Install Nix" uses: cachix/install-nix-action@v12 with: nix_path: nixpkgs=channel:nixos-unstable - - name: Install Cachix + - name: "Install Cachix" uses: cachix/cachix-action@v7 with: name: ${{ env.cachixAccount }} signingKey: '${{ secrets.CACHIX_SIGNING_KEY }}' - - name: Determined Nix-build + - name: "Determined Nix-build" env: compiler: "ghc8101" buildFromSdist: "true" @@ -119,22 +119,22 @@ jobs: runs-on: ubuntu-latest continue-on-error: true steps: - - name: Git checkout + - name: "Git checkout" uses: actions/checkout@v2 with: submodules: recursive - - name: Install Nix + - name: "Install Nix" uses: cachix/install-nix-action@v12 with: nix_path: nixpkgs=channel:nixos-unstable - - name: Install Cachix + - name: "Install Cachix" uses: cachix/cachix-action@v7 with: name: ${{ env.cachixAccount }} signingKey: '${{ secrets.CACHIX_SIGNING_KEY }}' - - name: Nix-shell + - name: "Nix-shell" run: nix-shell --pure --command 'echo "Evaluated, loaded and entered $IN_NIX_SHELL Nix shell env."' - - name: Local Hoogle DB for the project development and tooling + - name: "Local Hoogle DB for the project development and tooling" run: nix-shell --pure --command 'hoogle True' From 52f39938c007c7202ce6b7df463623f2a04ccc11 Mon Sep 17 00:00:00 2001 From: Anton-Latukha Date: Wed, 2 Dec 2020 16:55:40 +0200 Subject: [PATCH 2/2] CI: GitHub: workflow: add project Nixpkgs-integration test --- .../On-Release-Nixpkgs-integration.yml | 27 +++++++++++++++++++ 1 file changed, 27 insertions(+) create mode 100644 .github/workflows/On-Release-Nixpkgs-integration.yml diff --git a/.github/workflows/On-Release-Nixpkgs-integration.yml b/.github/workflows/On-Release-Nixpkgs-integration.yml new file mode 100644 index 0000000..2b7e6e0 --- /dev/null +++ b/.github/workflows/On-Release-Nixpkgs-integration.yml @@ -0,0 +1,27 @@ +name: "Direct import & build inside Nixpkgs" + +on: + release: + # created: a draft is saved, or a release or pre-release is published without previously being saved as a draft + types: [ created ] + +jobs: + + build10: + name: "Clean integration test" + runs-on: ubuntu-latest + steps: + - name: "Git checkout" + uses: actions/checkout@v2 + - name: "Local cache" + uses: actions/cache@v2 + with: + path: | + /nix/store + key: ${{ runner.os }}-Nixpkgs-integration-test + - name: "Install Nix" + uses: cachix/install-nix-action@v12 + with: + nix_path: "nixpkgs=channel:nixos-unstable" + - name: "Run Nixpkgs integration test" + uses: Anton-Latukha/test-haskell-nixpkgs-integration-action@v1