diff options
| author | seth <[email protected]> | 2024-08-06 20:32:29 -0400 |
|---|---|---|
| committer | seth <[email protected]> | 2024-08-06 20:32:29 -0400 |
| commit | 7c328ba30596970af40e3bade54621ecfa3e7ad1 (patch) | |
| tree | 7f6665aaa47946fa1bd77141fbb90ef714e3a8e3 /.github | |
initial commit
Diffstat (limited to '.github')
| -rw-r--r-- | .github/dependabot.yml | 8 | ||||
| -rw-r--r-- | .github/workflows/ci.yaml | 78 |
2 files changed, 86 insertions, 0 deletions
diff --git a/.github/dependabot.yml b/.github/dependabot.yml new file mode 100644 index 0000000..4c39a33 --- /dev/null +++ b/.github/dependabot.yml @@ -0,0 +1,8 @@ +version: 2 +updates: + - package-ecosystem: "github-actions" + directory: "/" + schedule: + interval: "weekly" + commit-message: + prefix: "ci" diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml new file mode 100644 index 0000000..f6eb351 --- /dev/null +++ b/.github/workflows/ci.yaml @@ -0,0 +1,78 @@ +name: CI + +on: + push: + branches: [main] + pull_request: + workflow_dispatch: + +jobs: + build: + name: Build (${{ matrix.system }}) + + strategy: + fail-fast: false + matrix: + include: + - system: x86_64-linux + os: ubuntu-latest + + runs-on: ${{ matrix.os }} + + steps: + # https://github.com/actions/runner-images/issues/2840#issuecomment-790492173 + - name: Clear disk space + run: | + sudo rm -rf /usr/share/dotnet + sudo rm -rf /opt/ghc + sudo rm -rf /usr/local/share/boost + sudo rm -rf "$AGENT_TOOLSDIRECTORY" + + - name: Checkout repository + uses: actions/checkout@v4 + + - name: Install Nix + uses: DeterminateSystems/nix-installer-action@v13 + with: + diagnostic-endpoint: "" + + - name: Setup Cache + uses: DeterminateSystems/magic-nix-cache-action@v7 + + - name: Run build + run: | + nix run \ + --inputs-from . \ + nixpkgs#nix-fast-build -- \ + --no-nom \ + --option allow-import-from-derivation false + + format: + name: Format + + runs-on: ubuntu-latest + + steps: + - name: Checkout repository + uses: actions/checkout@v4 + + - name: Install Nix + uses: DeterminateSystems/nix-installer-action@v13 + with: + diagnostic-endpoint: "" + + - name: Check formatting + run: nix fmt -- --check . + + build-gate: + name: Build gate + needs: [build, format] + + if: always() + + runs-on: ubuntu-latest + + steps: + - name: Exit with error + if: contains(needs.*.result, 'failure') || contains(needs.*.result, 'cancelled') + run: exit 1 |
