Add Python 3 support (#296) #237
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: "Build and package" | |
on: | |
push: | |
branches: [ master ] | |
pull_request: | |
jobs: | |
build: | |
strategy: | |
fail-fast: false | |
matrix: | |
include: | |
- target: linux-exe | |
os: ubuntu-latest | |
- target: windows-exe | |
os: ubuntu-latest | |
- target: static-exe | |
os: ubuntu-latest | |
- target: osx-exe-bundle | |
os: macos-latest | |
- target: book | |
os: ubuntu-latest | |
- target: shell | |
os: ubuntu-latest | |
name: Build ${{ matrix.target }} | |
runs-on: ${{ matrix.os }} | |
steps: | |
- uses: actions/checkout@v3 | |
- uses: cachix/install-nix-action@v22 | |
with: | |
extra_nix_config: | | |
trusted-public-keys = hydra.iohk.io:f/Ea+s+dFdN+3Y/G+FDgSq+a5NEWhJGzdjvKNGv0/EQ= cache.nixos.org-1:6NCHdD59X431o0gWypbMrAURkbJ16ZPMQFGspcDShjY= | |
substituters = https://hydra.iohk.io https://cache.nixos.org/ | |
- name: "Cachix: tttool" | |
uses: cachix/cachix-action@v12 | |
with: | |
name: tttool | |
signingKey: '${{ secrets.CACHIX_SIGNING_KEY }}' | |
# until https://github.com/cachix/cachix-action/issues/86 is fixed: | |
- run: cachix watch-store tttool & | |
- run: nix-build --arg checkMaterialization true -A ${{ matrix.target }} | |
# work around https://github.com/actions/upload-artifact/issues/92 | |
- run: cp -RvL result upload | |
- uses: actions/upload-artifact@v3 | |
with: | |
name: tttool (${{ matrix.target }}) | |
path: upload/ | |
test: | |
runs-on: ubuntu-latest | |
needs: build | |
steps: | |
- uses: actions/checkout@v3 | |
- uses: cachix/install-nix-action@v22 | |
- name: "Cachix: tttool" | |
uses: cachix/cachix-action@v12 | |
with: | |
name: tttool | |
signingKey: '${{ secrets.CACHIX_SIGNING_KEY }}' | |
- run: nix-build -A tests | |
check-cabal-freeze: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
- uses: cachix/install-nix-action@v22 | |
- name: "Cachix: tttool" | |
uses: cachix/cachix-action@v12 | |
with: | |
name: tttool | |
signingKey: '${{ secrets.CACHIX_SIGNING_KEY }}' | |
- run: nix-build -A check-cabal-freeze | |
package: | |
# this will only work when the jobs above have uploaded their stuff to the | |
# nix cache, which will not work for pull requests from other repositories | |
if: github.repository == 'entropia/tip-toi-reveng' | |
runs-on: ubuntu-latest | |
needs: build | |
steps: | |
- uses: actions/checkout@v3 | |
- uses: cachix/install-nix-action@v22 | |
- name: "Cachix: tttool" | |
uses: cachix/cachix-action@v12 | |
with: | |
name: tttool | |
signingKey: '${{ secrets.CACHIX_SIGNING_KEY }}' | |
- run: nix-build -A release-zip | |
- run: unzip -d upload ./result/*.zip | |
- uses: actions/upload-artifact@v3 | |
with: | |
name: Release zip file | |
path: upload |