|  | 
|  | 1 | +jobs: | 
|  | 2 | +  coq: | 
|  | 3 | +    needs: [] | 
|  | 4 | +    runs-on: ubuntu-latest | 
|  | 5 | +    steps: | 
|  | 6 | +    - name: Determine which ref to test | 
|  | 7 | +      run: "if [ ${{ github.event_name }} = \"push\" ]; then\n  echo \"tested_ref=${{\ | 
|  | 8 | +        \ github.ref }}\" >> $GITHUB_ENV\nelse\n  merge_commit=$(git ls-remote ${{\ | 
|  | 9 | +        \ github.event.repository.html_url }} refs/pull/${{ github.event.number }}/merge\ | 
|  | 10 | +        \ | cut -f1)\n  if [ -z \"$merge_commit\" ]; then\n    echo \"tested_ref=refs/pull/${{\ | 
|  | 11 | +        \ github.event.number }}/head\" >> $GITHUB_ENV\n  else\n    echo \"tested_ref=refs/pull/${{\ | 
|  | 12 | +        \ github.event.number }}/merge\" >> $GITHUB_ENV\n  fi\nfi\n" | 
|  | 13 | +    - name: Git checkout | 
|  | 14 | +      uses: actions/checkout@v2 | 
|  | 15 | +      with: | 
|  | 16 | +        fetch-depth: 0 | 
|  | 17 | +        ref: ${{ env.tested_ref }} | 
|  | 18 | +    - name: Cachix install | 
|  | 19 | +      uses: cachix/install-nix-action@v12 | 
|  | 20 | +      with: | 
|  | 21 | +        nix_path: nixpkgs=channel:nixpkgs-unstable | 
|  | 22 | +    - name: Cachix setup coq | 
|  | 23 | +      uses: cachix/cachix-action@v8 | 
|  | 24 | +      with: | 
|  | 25 | +        name: coq | 
|  | 26 | +    - name: Cachix setup coq-community | 
|  | 27 | +      uses: cachix/cachix-action@v8 | 
|  | 28 | +      with: | 
|  | 29 | +        name: coq-community | 
|  | 30 | +    - name: Cachix setup math-comp | 
|  | 31 | +      uses: cachix/cachix-action@v8 | 
|  | 32 | +      with: | 
|  | 33 | +        name: math-comp | 
|  | 34 | +    - id: stepCheck | 
|  | 35 | +      name: Checking presence of CI target coq | 
|  | 36 | +      run: "nb_dry_run=$(NIXPKGS_ALLOW_UNFREE=1 nix-build --no-out-link \\\n   --argstr\ | 
|  | 37 | +        \ bundle \"default\" --argstr job \"coq\" \\\n   --dry-run 2>&1 > /dev/null)\n\ | 
|  | 38 | +        echo ::set-output name=status::$(echo $nb_dry_run | grep \"built:\" | sed\ | 
|  | 39 | +        \ \"s/.*/built/\")\n" | 
|  | 40 | +    - if: steps.stepCheck.outputs.status == 'built' | 
|  | 41 | +      name: Building/fetching current CI target | 
|  | 42 | +      run: NIXPKGS_ALLOW_UNFREE=1 nix-build --no-out-link --argstr bundle "default" | 
|  | 43 | +        --argstr job "coq" | 
|  | 44 | +  coqeal: | 
|  | 45 | +    needs: | 
|  | 46 | +    - coq | 
|  | 47 | +    - paramcoq | 
|  | 48 | +    runs-on: ubuntu-latest | 
|  | 49 | +    steps: | 
|  | 50 | +    - name: Determine which ref to test | 
|  | 51 | +      run: "if [ ${{ github.event_name }} = \"push\" ]; then\n  echo \"tested_ref=${{\ | 
|  | 52 | +        \ github.ref }}\" >> $GITHUB_ENV\nelse\n  merge_commit=$(git ls-remote ${{\ | 
|  | 53 | +        \ github.event.repository.html_url }} refs/pull/${{ github.event.number }}/merge\ | 
|  | 54 | +        \ | cut -f1)\n  if [ -z \"$merge_commit\" ]; then\n    echo \"tested_ref=refs/pull/${{\ | 
|  | 55 | +        \ github.event.number }}/head\" >> $GITHUB_ENV\n  else\n    echo \"tested_ref=refs/pull/${{\ | 
|  | 56 | +        \ github.event.number }}/merge\" >> $GITHUB_ENV\n  fi\nfi\n" | 
|  | 57 | +    - name: Git checkout | 
|  | 58 | +      uses: actions/checkout@v2 | 
|  | 59 | +      with: | 
|  | 60 | +        fetch-depth: 0 | 
|  | 61 | +        ref: ${{ env.tested_ref }} | 
|  | 62 | +    - name: Cachix install | 
|  | 63 | +      uses: cachix/install-nix-action@v12 | 
|  | 64 | +      with: | 
|  | 65 | +        nix_path: nixpkgs=channel:nixpkgs-unstable | 
|  | 66 | +    - name: Cachix setup coq | 
|  | 67 | +      uses: cachix/cachix-action@v8 | 
|  | 68 | +      with: | 
|  | 69 | +        name: coq | 
|  | 70 | +    - name: Cachix setup coq-community | 
|  | 71 | +      uses: cachix/cachix-action@v8 | 
|  | 72 | +      with: | 
|  | 73 | +        name: coq-community | 
|  | 74 | +    - name: Cachix setup math-comp | 
|  | 75 | +      uses: cachix/cachix-action@v8 | 
|  | 76 | +      with: | 
|  | 77 | +        name: math-comp | 
|  | 78 | +    - id: stepCheck | 
|  | 79 | +      name: Checking presence of CI target coqeal | 
|  | 80 | +      run: "nb_dry_run=$(NIXPKGS_ALLOW_UNFREE=1 nix-build --no-out-link \\\n   --argstr\ | 
|  | 81 | +        \ bundle \"default\" --argstr job \"coqeal\" \\\n   --dry-run 2>&1 > /dev/null)\n\ | 
|  | 82 | +        echo ::set-output name=status::$(echo $nb_dry_run | grep \"built:\" | sed\ | 
|  | 83 | +        \ \"s/.*/built/\")\n" | 
|  | 84 | +    - if: steps.stepCheck.outputs.status == 'built' | 
|  | 85 | +      name: 'Building/fetching previous CI target: coq' | 
|  | 86 | +      run: NIXPKGS_ALLOW_UNFREE=1 nix-build --no-out-link --argstr bundle "default" | 
|  | 87 | +        --argstr job "coq" | 
|  | 88 | +    - if: steps.stepCheck.outputs.status == 'built' | 
|  | 89 | +      name: 'Building/fetching previous CI target: paramcoq' | 
|  | 90 | +      run: NIXPKGS_ALLOW_UNFREE=1 nix-build --no-out-link --argstr bundle "default" | 
|  | 91 | +        --argstr job "paramcoq" | 
|  | 92 | +    - if: steps.stepCheck.outputs.status == 'built' | 
|  | 93 | +      name: Building/fetching current CI target | 
|  | 94 | +      run: NIXPKGS_ALLOW_UNFREE=1 nix-build --no-out-link --argstr bundle "default" | 
|  | 95 | +        --argstr job "coqeal" | 
|  | 96 | +  paramcoq: | 
|  | 97 | +    needs: | 
|  | 98 | +    - coq | 
|  | 99 | +    runs-on: ubuntu-latest | 
|  | 100 | +    steps: | 
|  | 101 | +    - name: Determine which ref to test | 
|  | 102 | +      run: "if [ ${{ github.event_name }} = \"push\" ]; then\n  echo \"tested_ref=${{\ | 
|  | 103 | +        \ github.ref }}\" >> $GITHUB_ENV\nelse\n  merge_commit=$(git ls-remote ${{\ | 
|  | 104 | +        \ github.event.repository.html_url }} refs/pull/${{ github.event.number }}/merge\ | 
|  | 105 | +        \ | cut -f1)\n  if [ -z \"$merge_commit\" ]; then\n    echo \"tested_ref=refs/pull/${{\ | 
|  | 106 | +        \ github.event.number }}/head\" >> $GITHUB_ENV\n  else\n    echo \"tested_ref=refs/pull/${{\ | 
|  | 107 | +        \ github.event.number }}/merge\" >> $GITHUB_ENV\n  fi\nfi\n" | 
|  | 108 | +    - name: Git checkout | 
|  | 109 | +      uses: actions/checkout@v2 | 
|  | 110 | +      with: | 
|  | 111 | +        fetch-depth: 0 | 
|  | 112 | +        ref: ${{ env.tested_ref }} | 
|  | 113 | +    - name: Cachix install | 
|  | 114 | +      uses: cachix/install-nix-action@v12 | 
|  | 115 | +      with: | 
|  | 116 | +        nix_path: nixpkgs=channel:nixpkgs-unstable | 
|  | 117 | +    - name: Cachix setup coq | 
|  | 118 | +      uses: cachix/cachix-action@v8 | 
|  | 119 | +      with: | 
|  | 120 | +        name: coq | 
|  | 121 | +    - name: Cachix setup coq-community | 
|  | 122 | +      uses: cachix/cachix-action@v8 | 
|  | 123 | +      with: | 
|  | 124 | +        name: coq-community | 
|  | 125 | +    - name: Cachix setup math-comp | 
|  | 126 | +      uses: cachix/cachix-action@v8 | 
|  | 127 | +      with: | 
|  | 128 | +        name: math-comp | 
|  | 129 | +    - id: stepCheck | 
|  | 130 | +      name: Checking presence of CI target paramcoq | 
|  | 131 | +      run: "nb_dry_run=$(NIXPKGS_ALLOW_UNFREE=1 nix-build --no-out-link \\\n   --argstr\ | 
|  | 132 | +        \ bundle \"default\" --argstr job \"paramcoq\" \\\n   --dry-run 2>&1 > /dev/null)\n\ | 
|  | 133 | +        echo ::set-output name=status::$(echo $nb_dry_run | grep \"built:\" | sed\ | 
|  | 134 | +        \ \"s/.*/built/\")\n" | 
|  | 135 | +    - if: steps.stepCheck.outputs.status == 'built' | 
|  | 136 | +      name: 'Building/fetching previous CI target: coq' | 
|  | 137 | +      run: NIXPKGS_ALLOW_UNFREE=1 nix-build --no-out-link --argstr bundle "default" | 
|  | 138 | +        --argstr job "coq" | 
|  | 139 | +    - if: steps.stepCheck.outputs.status == 'built' | 
|  | 140 | +      name: Building/fetching current CI target | 
|  | 141 | +      run: NIXPKGS_ALLOW_UNFREE=1 nix-build --no-out-link --argstr bundle "default" | 
|  | 142 | +        --argstr job "paramcoq" | 
|  | 143 | +name: Nix CI for bundle default | 
|  | 144 | +'on': | 
|  | 145 | +  pull_request: | 
|  | 146 | +    paths: | 
|  | 147 | +    - .github/workflows/** | 
|  | 148 | +  pull_request_target: | 
|  | 149 | +    types: | 
|  | 150 | +    - opened | 
|  | 151 | +    - synchronize | 
|  | 152 | +    - reopened | 
|  | 153 | +  push: | 
|  | 154 | +    branches: | 
|  | 155 | +    - master | 
0 commit comments