From 88af5ee9660b776f5cd949d9f347a3d2c2802e02 Mon Sep 17 00:00:00 2001 From: Greg Burd Date: Wed, 20 Sep 2023 13:10:43 -0400 Subject: [PATCH] not fantastic --- .../workflows/cachix-install-nix-action.yml | 32 ----------- .github/workflows/main.yml | 53 +++++-------------- .gitignore | 6 +++ main.yml | 1 + 4 files changed, 21 insertions(+), 71 deletions(-) delete mode 100644 .github/workflows/cachix-install-nix-action.yml diff --git a/.github/workflows/cachix-install-nix-action.yml b/.github/workflows/cachix-install-nix-action.yml deleted file mode 100644 index 8eccd7b..0000000 --- a/.github/workflows/cachix-install-nix-action.yml +++ /dev/null @@ -1,32 +0,0 @@ -name: Nix Flake actions - -on: - pull_request: - push: - branches: - - master - - main - -jobs: - nix-matrix: - runs-on: ubuntu-latest - outputs: - matrix: ${{ steps.set-matrix.outputs.matrix }} - steps: - - uses: actions/checkout@v3 - - uses: cachix/install-nix-action@v22 - - id: set-matrix - name: Generate Nix Matrix - run: | - set -Eeu - echo "matrix=$(nix eval --json '.#githubActions.matrix')" >> "$GITHUB_OUTPUT" - - nix-build: - needs: nix-matrix - runs-on: ${{ matrix.os }} - strategy: - matrix: ${{fromJSON(needs.nix-matrix.outputs.matrix)}} - steps: - - uses: actions/checkout@v3 - - uses: cachix/install-nix-action@v22 - - run: nix build -L ".#${{ matrix.attr }}" diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index a51009c..f294e24 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -26,55 +26,30 @@ jobs: steps: - uses: actions/checkout@v3 - uses: cachix/install-nix-action@v22 + with: + nix_path: nixpkgs=channel:nixos-unstable + CACHIX_SIGNING_KEY: ${{ secrets.CACHIX_SIGNING_KEY }} + github_access_token: ${{ secrets.GITHUB_TOKEN }} - id: set-matrix name: Generate Nix Matrix run: | set -Eeu echo "matrix=$(nix eval --json '.#githubActions.matrix')" >> "$GITHUB_OUTPUT" + echo 'matrix={"include":[{"attr":"githubActions.checks.x86_64-linux.hello","os":["ubuntu-22.04"]},{"attr":"githubActions.checks.x86_64-linux.container","os":["ubuntu-22.04"]}]}' >> "$GITHUB_OUTPUT" + nix-build: needs: nix-matrix name: Build on ${{ matrix.attr }} - runs-on: ${{ matrix.os }} + runs-on: ubuntu-latest strategy: matrix: ${{fromJSON(needs.nix-matrix.outputs.matrix)}} steps: - - uses: cachix/install-nix-action@v22 - uses: actions/checkout@v3 + - uses: cachix/install-nix-action@v22 + with: + nix_path: nixpkgs=channel:nixos-unstable + CACHIX_SIGNING_KEY: ${{ secrets.CACHIX_SIGNING_KEY }} + github_access_token: ${{ secrets.GITHUB_TOKEN }} + - name: Print nixpkgs version + run: nix-instantiate --eval -E '(import {}).lib.version' - run: nix build -L ".#${{ matrix.attr }}" - - # runs-on: ubuntu-latest - # name: Build on ${{ matrix.distro }} (${{ matrix.version }}) for ${{ matrix.arch }} - - # # strategy: - # # matrix: - # # include: - # # - arch: x86_64 - # # distro: Debian - # # version: bullseye - # # - arch: aarch64 - # # distro: Debian - # # version: bullseye - # # - arch: ppc64le - # # distro: Debian - # # version: bullseye - # # - arch: risc64 - # # distro: Ubuntu - # # version: ubuntu_latest - - # steps: - # - uses: actions/checkout@v3 - # - uses: cachix/install-nix-action@v22 - # with: - # github_access_token: ${{ secrets.GITHUB_TOKEN }} - # - run: nix build -L - # - run: nix flake check - - # nix-build: - # needs: nix-matrix - # runs-on: ${{ matrix.os }} - # strategy: - # matrix: ${{fromJSON(needs.nix-matrix.outputs.matrix)}} - # steps: - # - uses: actions/checkout@v3 - # - uses: cachix/install-nix-action@v22 - # - run: nix build -L ".#${{ matrix.attr }}" diff --git a/.gitignore b/.gitignore index cde87e9..24aedb0 100644 --- a/.gitignore +++ b/.gitignore @@ -51,3 +51,9 @@ Makefile /include/stamp-h? /libtool /stamp-h +configure + +.idea +autom4te.cache +build + diff --git a/main.yml b/main.yml index 4c50534..5fee50d 100644 --- a/main.yml +++ b/main.yml @@ -44,6 +44,7 @@ jobs: - uses: actions/checkout@v3 - uses: cachix/install-nix-action@v22 with: + nix_path: nixpkgs=channel:nixos-unstable CACHIX_SIGNING_KEY: ${{ secrets.CACHIX_SIGNING_KEY }} github_access_token: ${{ secrets.GITHUB_TOKEN }} - name: Print nixpkgs version