git.fiddlerwoaroof.com
Raw Blame History
# This is a basic workflow to help you get started with Actions

name: CI

# Controls when the workflow will run
on:
  # Triggers the workflow on push or pull request events but only for the master branch
  push:
    branches: [ master ]
  pull_request:
    branches: [ master ]

  # Allows you to run this workflow manually from the Actions tab
  workflow_dispatch:

# A workflow run is made up of one or more jobs that can run sequentially or in parallel
jobs:
  # This workflow contains a single job called "build"
  build:
    # The type of runner that the job will run on
    runs-on: ubuntu-latest

    steps:
      # Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
      - uses: actions/checkout@v3

      - uses: cachix/install-nix-action@v20
        with:
          extra_nix_config: |
            access-tokens = github.com=${{ secrets.GITHUB_TOKEN }}

      # Runs a set of commands using the runners shell
      - name: Run a multi-line script
        run: |
          mkdir out
          nix build
          nix develop -c zig build -Dtarget=aarch64-linux-gnu && mv zig-out/bin/sigexec out/sigexec-aarch64-linux-gnu
          nix develop -c zig build -Dtarget=aarch64-linux-musl && mv zig-out/bin/sigexec out/sigexec-aarch64-linux-musl
          nix develop -c zig build -Dtarget=aarch64-macos-none && mv zig-out/bin/sigexec out/sigexec-aarch64-macos-none
          nix develop -c zig build -Dtarget=i386-linux-gnu && mv zig-out/bin/sigexec out/sigexec-i386-linux-gnu
          nix develop -c zig build -Dtarget=x86_64-linux-gnu && mv zig-out/bin/sigexec out/sigexec-x86_64-linux-gnu
          nix develop -c zig build -Dtarget=x86_64-linux-musl && mv zig-out/bin/sigexec out/sigexec-x86_64-linux-musl
          nix develop -c zig build -Dtarget=x86_64-macos-none && mv zig-out/bin/sigexec out/sigexec-x86_64-macos-none

      - name: Run test
        run: |
          nix run .\#do-test
      - uses: actions/upload-artifact@v3
        with:
          name: executables
          path: |
            out/sigexec-*