Update HLS to version 2.0 (#96) #220
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: Prebuild DevX closures | |
on: | |
push: | |
branches: | |
- main | |
workflow_dispatch: | |
env: | |
REGISTRY: ghcr.io | |
IMAGE_NAME: ${{ github.repository }} | |
jobs: | |
build: | |
strategy: | |
fail-fast: false | |
matrix: | |
platform: | |
- x86_64-darwin | |
- x86_64-linux | |
- aarch64-darwin | |
# Currently broken | |
#- aarch64-linux | |
compiler-nix-name: | |
- ghc8107 | |
- ghc928 | |
- ghc962 | |
target-platform: | |
- "" | |
- "-static" | |
- "-js" | |
- "-windows" | |
variant: | |
- "" | |
- "-minimal" | |
iog: | |
- "" | |
- "-iog" | |
exclude: | |
# Just cross compiling javascript with ghc 9.6.2 for now | |
- compiler-nix-name: ghc8107 | |
target-platform: "-js" | |
- compiler-nix-name: ghc928 | |
target-platform: "-js" | |
# Static builds not working for darwin yet | |
- platform: x86_64-darwin | |
target-platform: "-static" | |
# Static tools not working right now (so just building "-static-minimal" for now) | |
- target-platform: "-static" | |
variant: "" | |
# Windows cross compilation only works on x86_64-linux right now. | |
- platform: aarch64-darwin | |
target-platform: "-windows" | |
- platform: aarch64-linux | |
target-platform: "-windows" | |
- platform: x86_64-darwin | |
target-platform: "-windows" | |
# It does not makes sense to build minimal image that include IOG extra tooling ... | |
# ... "-minimal" and "-iog" are mutually exclusive options! | |
- variant: "-minimal" | |
iog: "-iog" | |
# On darwin the `-js` target require `-minimal` to be set: | |
- target-platform: "-js" | |
platform: aarch64-darwin | |
variant: "" | |
- target-platform: "-js" | |
platform: x86_64-darwin | |
variant: "" | |
runs-on: ubuntu-latest | |
permissions: | |
contents: read | |
packages: write | |
steps: | |
- name: Install Nix with good defaults | |
uses: cachix/install-nix-action@v20 | |
with: | |
extra_nix_config: | | |
trusted-public-keys = cache.nixos.org-1:6NCHdD59X431o0gWypbMrAURkbJ16ZPMQFGspcDShjY= hydra.iohk.io:f/Ea+s+dFdN+3Y/G+FDgSq+a5NEWhJGzdjvKNGv0/EQ= loony-tools:pr9m4BkM/5/eSTZlkQyRt57Jz7OMBxNSUiMC4FkcNfk= | |
substituters = https://cache.iog.io/ https://cache.zw3rk.com/ https://cache.nixos.org/ | |
nix_path: nixpkgs=channel:nixos-unstable | |
- name: Checkout repository | |
uses: actions/checkout@v3 | |
- name: Log in to the Container registry | |
uses: docker/[email protected] | |
with: | |
registry: ${{ env.REGISTRY }} | |
username: ${{ github.actor }} | |
password: ${{ secrets.GITHUB_TOKEN }} | |
- name: Work around issue fetching cabal revision files | |
run: | | |
# This will cause the revised `.cabal` files used whan building alex | |
# for building GHC to be fetched using the `x86_64-linux` `.drv` for `fetchurl`. | |
# Later when we want the non `x86_64-linux` version later it will find the | |
# fixed output of the derivation is already in the `/nix/store` and will | |
# not try to fetch it using the platform we do not have a builder for. | |
if [[ "${{ matrix.platform }}" != "x86_64-linux" && "${{ matrix.target-platform }}" = "-js" ]]; then | |
nix build ".#hydraJobs.x86_64-linux.${{ matrix.compiler-nix-name }}-js-minimal" --show-trace | |
fi | |
- name: Compute and upload closure and developer environment to ghcr.io | |
env: | |
NIX_STORE_SECRET_KEY: ${{ secrets.SECRET_KEY }} | |
DEV_SHELL: ${{ matrix.platform }}.${{ matrix.compiler-nix-name }}${{ matrix.target-platform }}${{ matrix.variant }}${{ matrix.iog }}-env | |
run: ./extra/ghcr-upload.sh |