a bare-bones limbo server in rust (mirror of https://github.com/xoogware/crawlspace)
at master 2.1 kB view raw
1# Copyright (c) 2024 Andrew Brower. 2# This file is part of Crawlspace. 3# 4# Crawlspace is free software: you can redistribute it and/or 5# modify it under the terms of the GNU Affero General Public 6# License as published by the Free Software Foundation, either 7# version 3 of the License, or (at your option) any later version. 8# 9# Crawlspace is distributed in the hope that it will be useful, 10# but WITHOUT ANY WARRANTY; without even the implied warranty of 11# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 12# Affero General Public License for more details. 13# 14# You should have received a copy of the GNU Affero General Public 15# License along with Crawlspace. If not, see 16# <https://www.gnu.org/licenses/>. 17 18name: CI 19on: 20 push: 21 release: 22 workflow_dispatch: 23 inputs: 24 buildType: 25 description: 'Build Type' 26 required: true 27 default: 'Release' 28 type: choice 29 options: 30 - Release 31 - Debug 32 version: 33 description: 'Version Tag (defaults to commit hash)' 34 required: false 35 type: string 36 37env: 38 RUSTFLAGS: "-Dwarnings" 39 40jobs: 41 clippy: 42 runs-on: ubuntu-latest 43 steps: 44 - uses: actions/checkout@v4 45 - uses: DeterminateSystems/nix-installer-action@main 46 - uses: DeterminateSystems/magic-nix-cache-action@main 47 - name: Run clippy 48 run: nix develop --command cargo clippy --all-targets --all-features 49 50 build_release: 51 needs: clippy 52 runs-on: ubuntu-latest 53 if: ${{ (github.event_name == 'release') || github.event_name == 'workflow_dispatch' }} 54 env: 55 BUILD_COMMAND: ${{ (github.event_name == 'workflow_dispatch' && inputs.buildType == 'Release') && 'nix build .#release' || 'nix build .' }} 56 steps: 57 - uses: actions/checkout@v4 58 - uses: DeterminateSystems/nix-installer-action@main 59 - uses: DeterminateSystems/magic-nix-cache-action@main 60 - name: Build Crawlspace 61 run: $BUILD_COMMAND 62 - uses: actions/upload-artifact@v4 63 with: 64 path: ./result/bin/crawlspace