Skip to content

Enable cross-compiler development #14

Enable cross-compiler development

Enable cross-compiler development #14

name: RISC-V 64bit cross-compiler CI
on:
push:
branches: [ master ]
pull_request:
branches: [ master ]
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Prepare git
run:
git config --global url."git://github.com/ghc/packages-".insteadOf git://github.com/ghc/packages/ &&
git config --global url."http://github.com/ghc/packages-".insteadOf http://github.com/ghc/packages/ &&
git config --global url."https://github.com/ghc/packages-".insteadOf https://github.com/ghc/packages/ &&
git config --global url."ssh://[email protected]/ghc/packages-".insteadOf ssh://[email protected]/ghc/packages/ &&
git config --global url."[email protected]:ghc/packages-".insteadOf [email protected]:ghc/packages/
- name: Checkout GHC
uses: actions/[email protected]
with:
repository: ghc/ghc
submodules: recursive
- name: Checkout ghc.nix
uses: actions/[email protected]
with:
path: ghc.nix
- name: Install nix
uses: cachix/install-nix-action@v20
- name: Use cachix
uses: cachix/cachix-action@v12
with:
name: ghc-nix
signingKey: '${{ secrets.CACHIX_SIGNING_KEY }}'
- name: Run nix-shell - Boot and Configure
run: nix-shell --pure ghc.nix/shell.nix --arg withLlvm true --arg crossTarget '"riscv64"' --command "./boot && configure_ghc"
- name: Run nix-shell - cabal update
run: nix-shell --pure ghc.nix/shell.nix --arg withLlvm true --arg crossTarget '"riscv64"' --command "pushd hadrian; cabal update; popd"
- name: Run nix-shell - Build GHC
run: nix-shell --pure ghc.nix/shell.nix --arg withLlvm true --arg crossTarget '"riscv64"' --command "hadrian/build -j --flavour=quickest"