2021-06-29 21:42:48 +03:00
|
|
|
name: Idris2
|
2021-01-20 23:15:24 +03:00
|
|
|
|
|
|
|
on:
|
2021-06-29 21:42:48 +03:00
|
|
|
push:
|
|
|
|
branches:
|
|
|
|
- '*'
|
|
|
|
tags:
|
|
|
|
- '*'
|
|
|
|
pull_request:
|
|
|
|
branches:
|
|
|
|
- master
|
|
|
|
- main
|
2021-01-20 23:15:24 +03:00
|
|
|
|
|
|
|
env:
|
2021-06-28 15:48:37 +03:00
|
|
|
IDRIS2_VERSION: 0.4.0 # For previous-version build
|
2021-01-20 23:15:24 +03:00
|
|
|
|
|
|
|
jobs:
|
|
|
|
|
2021-06-29 21:42:48 +03:00
|
|
|
######################################################################
|
|
|
|
# Build from the previous version
|
|
|
|
# We perform this check before all the other ones because:
|
|
|
|
# 1. It is fast
|
|
|
|
# 2. If it fails then there is no point in trying the rest
|
|
|
|
######################################################################
|
2021-01-20 23:15:24 +03:00
|
|
|
|
2021-06-29 21:42:48 +03:00
|
|
|
quick-check:
|
2021-01-20 23:15:24 +03:00
|
|
|
runs-on: ubuntu-latest
|
|
|
|
env:
|
|
|
|
IDRIS2_CG: chez
|
2021-06-29 21:42:48 +03:00
|
|
|
SCHEME: scheme
|
2021-01-20 23:15:24 +03:00
|
|
|
steps:
|
|
|
|
- name: Checkout
|
|
|
|
uses: actions/checkout@v2
|
|
|
|
- name: Install build dependencies
|
|
|
|
run: |
|
2021-06-15 16:31:31 +03:00
|
|
|
echo "deb http://security.ubuntu.com/ubuntu hirsute universe" | sudo tee -a /etc/apt/sources.list
|
|
|
|
sudo apt-get update
|
|
|
|
sudo apt-get install -y -t hirsute chezscheme
|
2021-05-20 12:21:39 +03:00
|
|
|
echo "$HOME/.idris2/bin" >> $GITHUB_PATH
|
2021-06-29 21:42:48 +03:00
|
|
|
|
|
|
|
# Get our hands on the released version either by using the cache
|
|
|
|
# or by rebuilding it if necessary.
|
|
|
|
- name: Cache Chez Previous Version
|
|
|
|
id: previous-version-cache
|
|
|
|
uses: actions/cache@v2
|
|
|
|
with:
|
|
|
|
path: Idris2-${{ env.IDRIS2_VERSION }}
|
|
|
|
key: ${{ runner.os }}-idris2-bootstrapped-hirsute-chez-${{ env.IDRIS2_VERSION }}
|
|
|
|
- name : Build previous version
|
|
|
|
if: steps.previous-version-cache.outputs.cache-hit != 'true'
|
|
|
|
run: |
|
|
|
|
wget https://www.idris-lang.org/idris2-src/idris2-$IDRIS2_VERSION.tgz
|
|
|
|
tar zxvf idris2-$IDRIS2_VERSION.tgz
|
|
|
|
cd Idris2-$IDRIS2_VERSION
|
|
|
|
make bootstrap
|
|
|
|
cd ..
|
|
|
|
- name: Install previous version
|
|
|
|
run: |
|
|
|
|
cd Idris2-$IDRIS2_VERSION
|
|
|
|
make install
|
|
|
|
cd ..
|
|
|
|
|
|
|
|
# Build the current version and save the installation.
|
|
|
|
- name: Build current version
|
|
|
|
run: |
|
|
|
|
make && make install
|
|
|
|
- name: Artifact Idris2 from previous version
|
2021-01-20 23:15:24 +03:00
|
|
|
uses: actions/upload-artifact@v2
|
|
|
|
with:
|
2021-06-29 21:42:48 +03:00
|
|
|
name: ubuntu-installed-idris2-${{ env.IDRIS2_VERSION }}-chez
|
2021-01-20 23:15:24 +03:00
|
|
|
path: ~/.idris2/
|
|
|
|
|
2021-06-29 21:42:48 +03:00
|
|
|
######################################################################
|
|
|
|
# Bootstrapping builds
|
|
|
|
######################################################################
|
|
|
|
|
|
|
|
# CHEZ
|
|
|
|
|
|
|
|
ubuntu-bootstrap-chez:
|
|
|
|
needs: quick-check
|
2021-01-20 23:15:24 +03:00
|
|
|
runs-on: ubuntu-latest
|
|
|
|
env:
|
2021-06-29 21:42:48 +03:00
|
|
|
IDRIS2_CG: chez
|
|
|
|
SCHEME: scheme
|
2021-01-20 23:15:24 +03:00
|
|
|
steps:
|
|
|
|
- name: Checkout
|
|
|
|
uses: actions/checkout@v2
|
|
|
|
- name: Install build dependencies
|
|
|
|
run: |
|
2021-06-29 21:42:48 +03:00
|
|
|
echo "deb http://security.ubuntu.com/ubuntu hirsute universe" | sudo tee -a /etc/apt/sources.list
|
|
|
|
sudo apt-get update
|
|
|
|
sudo apt-get install -y -t hirsute chezscheme
|
2021-05-20 12:21:39 +03:00
|
|
|
echo "$HOME/.idris2/bin" >> $GITHUB_PATH
|
2021-07-04 05:17:13 +03:00
|
|
|
- name: Make bootstrap folder readonly
|
|
|
|
run: chmod -R a-w bootstrap
|
2021-01-20 23:15:24 +03:00
|
|
|
- name: Build from bootstrap
|
2021-06-29 21:42:48 +03:00
|
|
|
run: make bootstrap && make install
|
2021-01-20 23:15:24 +03:00
|
|
|
- name: Artifact Bootstrapped Idris2
|
|
|
|
uses: actions/upload-artifact@v2
|
|
|
|
with:
|
2021-06-29 21:42:48 +03:00
|
|
|
name: ubuntu-installed-bootstrapped-idris2-chez
|
2021-01-20 23:15:24 +03:00
|
|
|
path: ~/.idris2/
|
|
|
|
|
2021-06-29 21:42:48 +03:00
|
|
|
macos-bootstrap-chez:
|
|
|
|
needs: quick-check
|
|
|
|
runs-on: macos-latest
|
2021-01-20 23:15:24 +03:00
|
|
|
env:
|
2021-06-29 21:42:48 +03:00
|
|
|
SCHEME: chez
|
2021-01-20 23:15:24 +03:00
|
|
|
steps:
|
|
|
|
- name: Checkout
|
|
|
|
uses: actions/checkout@v2
|
|
|
|
- name: Install build dependencies
|
|
|
|
run: |
|
2021-06-29 21:42:48 +03:00
|
|
|
brew install chezscheme
|
|
|
|
brew install coreutils
|
2021-05-20 12:21:39 +03:00
|
|
|
echo "$HOME/.idris2/bin" >> $GITHUB_PATH
|
2021-07-04 05:17:13 +03:00
|
|
|
- name: Make bootstrap folder readonly
|
|
|
|
run: chmod -R a-w bootstrap
|
2021-06-29 21:42:48 +03:00
|
|
|
- name: Build Idris 2 from bootstrap
|
|
|
|
run: make bootstrap && make install
|
|
|
|
shell: bash
|
|
|
|
- name: Artifact Bootstrapped Idris2
|
|
|
|
uses: actions/upload-artifact@v2
|
2021-01-20 23:15:24 +03:00
|
|
|
with:
|
2021-06-29 21:42:48 +03:00
|
|
|
name: macos-installed-bootstrapped-idris2-chez
|
|
|
|
path: ~/.idris2/
|
|
|
|
|
|
|
|
windows-bootstrap-chez:
|
|
|
|
needs: quick-check
|
|
|
|
runs-on: windows-latest
|
|
|
|
env:
|
|
|
|
MSYSTEM: MINGW64
|
|
|
|
MSYS2_PATH_TYPE: inherit
|
|
|
|
SCHEME: scheme
|
|
|
|
CC: gcc
|
|
|
|
steps:
|
|
|
|
- name: Init
|
2021-01-20 23:15:24 +03:00
|
|
|
run: |
|
2021-06-29 21:42:48 +03:00
|
|
|
git config --global core.autocrlf false
|
|
|
|
- name: Checkout
|
|
|
|
uses: actions/checkout@v2
|
|
|
|
- name: Get Chez Scheme
|
2021-01-20 23:15:24 +03:00
|
|
|
run: |
|
2021-06-29 21:42:48 +03:00
|
|
|
git clone --depth 1 https://github.com/cisco/ChezScheme
|
|
|
|
c:\msys64\usr\bin\bash -l -c "pacman -S --noconfirm tar make"
|
|
|
|
echo "PWD=$(c:\msys64\usr\bin\cygpath -u $(pwd))" | Out-File -FilePath $env:GITHUB_ENV -Encoding utf8 -Append
|
|
|
|
- name: Configure and Build Chez Scheme
|
|
|
|
run: |
|
|
|
|
c:\msys64\usr\bin\bash -l -c "cd $env:PWD && cd ChezScheme && ./configure --threads && make"
|
|
|
|
- name: Set Path
|
|
|
|
run: |
|
|
|
|
$chez="$(pwd)\ChezScheme\ta6nt\bin\ta6nt"
|
|
|
|
$idris="$(pwd)\.idris2"
|
|
|
|
echo "$chez" | Out-File -FilePath $env:GITHUB_PATH -Encoding utf8 -Append
|
|
|
|
echo "$idris\bin" | Out-File -FilePath $env:GITHUB_PATH -Encoding utf8 -Append
|
|
|
|
echo "IDRIS_PREFIX=$idris" | Out-File -FilePath $env:GITHUB_ENV -Encoding utf8 -Append
|
|
|
|
echo "PREFIX=$(c:\msys64\usr\bin\cygpath -u $idris)" | Out-File -FilePath $env:GITHUB_ENV -Encoding utf8 -Append
|
|
|
|
- name: Test Scheme
|
|
|
|
run: |
|
|
|
|
scheme --version
|
2021-07-19 04:14:43 +03:00
|
|
|
- name: Bootstrap
|
|
|
|
run: c:\msys64\usr\bin\bash -l -c "cd $env:PWD && make bootstrap"
|
|
|
|
- name: Bootstrap test
|
|
|
|
run: c:\msys64\usr\bin\bash -l -c "cd $env:PWD && make bootstrap-test"
|
|
|
|
- name: Install
|
|
|
|
run: c:\msys64\usr\bin\bash -l -c "cd $env:PWD && make install"
|
2021-06-29 21:42:48 +03:00
|
|
|
|
|
|
|
nix-bootstrap-chez:
|
|
|
|
needs: quick-check
|
|
|
|
runs-on: ubuntu-latest
|
|
|
|
steps:
|
|
|
|
- uses: actions/checkout@v2
|
|
|
|
with:
|
|
|
|
fetch-depth: 0
|
|
|
|
- uses: cachix/install-nix-action@v12
|
|
|
|
with:
|
|
|
|
install_url: https://github.com/numtide/nix-flakes-installer/releases/download/nix-2.4pre20210126_f15f0b8/install
|
|
|
|
- run: nix-build -A checks.x86_64-linux
|
|
|
|
|
|
|
|
# RACKET
|
|
|
|
|
|
|
|
ubuntu-bootstrap-racket:
|
|
|
|
needs: quick-check
|
|
|
|
runs-on: ubuntu-latest
|
|
|
|
env:
|
|
|
|
IDRIS2_CG: racket
|
|
|
|
steps:
|
|
|
|
- name: Checkout
|
|
|
|
uses: actions/checkout@v2
|
|
|
|
- name: Install build dependencies
|
|
|
|
run: |
|
|
|
|
sudo apt-get install -y racket
|
|
|
|
echo "$HOME/.idris2/bin" >> $GITHUB_PATH
|
2021-07-04 05:17:13 +03:00
|
|
|
- name: Make bootstrap folder readonly
|
|
|
|
run: chmod -R a-w bootstrap
|
2021-06-29 21:42:48 +03:00
|
|
|
- name: Build from bootstrap
|
|
|
|
run: make bootstrap-racket && make install
|
|
|
|
- name: Artifact Bootstrapped Idris2
|
2021-01-20 23:15:24 +03:00
|
|
|
uses: actions/upload-artifact@v2
|
|
|
|
with:
|
2021-06-29 21:42:48 +03:00
|
|
|
name: ubuntu-installed-bootstrapped-idris2-racket
|
2021-01-20 23:15:24 +03:00
|
|
|
path: ~/.idris2/
|
|
|
|
|
2021-06-29 21:42:48 +03:00
|
|
|
######################################################################
|
|
|
|
# Self-hosting builds and testing
|
|
|
|
######################################################################
|
|
|
|
|
|
|
|
# CHEZ
|
2021-01-20 23:15:24 +03:00
|
|
|
|
2021-06-29 21:42:48 +03:00
|
|
|
ubuntu-self-host-chez:
|
|
|
|
needs: ubuntu-bootstrap-chez
|
2021-01-20 23:15:24 +03:00
|
|
|
runs-on: ubuntu-latest
|
|
|
|
env:
|
|
|
|
IDRIS2_CG: chez
|
2021-06-29 21:42:48 +03:00
|
|
|
SCHEME: scheme
|
2021-01-20 23:15:24 +03:00
|
|
|
steps:
|
|
|
|
- name: Checkout
|
|
|
|
uses: actions/checkout@v2
|
|
|
|
- name: Download Idris2 Artifact
|
|
|
|
uses: actions/download-artifact@v2
|
|
|
|
with:
|
2021-06-29 21:42:48 +03:00
|
|
|
name: ubuntu-installed-bootstrapped-idris2-chez
|
2021-01-20 23:15:24 +03:00
|
|
|
path: ~/.idris2/
|
|
|
|
- name: Install build dependencies
|
|
|
|
run: |
|
2021-06-15 16:31:31 +03:00
|
|
|
echo "deb http://security.ubuntu.com/ubuntu hirsute universe" | sudo tee -a /etc/apt/sources.list
|
|
|
|
sudo apt-get update
|
|
|
|
sudo apt-get install -y -t hirsute chezscheme
|
2021-05-20 12:21:39 +03:00
|
|
|
echo "$HOME/.idris2/bin" >> $GITHUB_PATH
|
2021-01-20 23:15:24 +03:00
|
|
|
chmod +x $HOME/.idris2/bin/idris2 $HOME/.idris2/bin/idris2_app/*
|
|
|
|
- name: Build self-hosted
|
2021-05-27 13:57:39 +03:00
|
|
|
run: make all IDRIS2_BOOT="idris2 -Werror" && make install
|
2021-01-20 23:15:24 +03:00
|
|
|
- name: Test self-hosted
|
|
|
|
run: make test INTERACTIVE=''
|
|
|
|
|
2021-06-29 21:42:48 +03:00
|
|
|
macos-self-host-chez:
|
|
|
|
needs: macos-bootstrap-chez
|
|
|
|
runs-on: macos-latest
|
|
|
|
env:
|
|
|
|
SCHEME: chez
|
|
|
|
steps:
|
|
|
|
- name: Checkout
|
|
|
|
uses: actions/checkout@v2
|
|
|
|
- name: Download Idris2 Artifact
|
|
|
|
uses: actions/download-artifact@v2
|
|
|
|
with:
|
|
|
|
name: macos-installed-bootstrapped-idris2-chez
|
|
|
|
path: ~/.idris2/
|
|
|
|
- name: Install build dependencies
|
|
|
|
run: |
|
|
|
|
brew install chezscheme
|
|
|
|
brew install coreutils
|
|
|
|
echo "$HOME/.idris2/bin" >> $GITHUB_PATH
|
|
|
|
chmod +x $HOME/.idris2/bin/idris2 $HOME/.idris2/bin/idris2_app/*
|
|
|
|
- name: Build self-hosted
|
|
|
|
run: make all IDRIS2_BOOT="idris2 -Werror" && make install
|
|
|
|
shell: bash
|
|
|
|
- name: Test self-hosted
|
|
|
|
run: make test INTERACTIVE=''
|
|
|
|
shell: bash
|
|
|
|
|
|
|
|
# RACKET
|
|
|
|
|
|
|
|
ubuntu-self-host-racket:
|
|
|
|
needs: ubuntu-bootstrap-racket
|
2021-01-20 23:15:24 +03:00
|
|
|
runs-on: ubuntu-latest
|
|
|
|
env:
|
|
|
|
IDRIS2_CG: racket
|
|
|
|
steps:
|
|
|
|
- name: Checkout
|
|
|
|
uses: actions/checkout@v2
|
|
|
|
- name: Download Idris2 Artifact
|
|
|
|
uses: actions/download-artifact@v2
|
|
|
|
with:
|
2021-06-29 21:42:48 +03:00
|
|
|
name: ubuntu-installed-bootstrapped-idris2-racket
|
2021-01-20 23:15:24 +03:00
|
|
|
path: ~/.idris2/
|
|
|
|
- name: Install build dependencies
|
|
|
|
run: |
|
|
|
|
sudo apt-get install -y racket
|
2021-05-20 12:21:39 +03:00
|
|
|
echo "$HOME/.idris2/bin" >> $GITHUB_PATH
|
2021-01-20 23:15:24 +03:00
|
|
|
chmod +x $HOME/.idris2/bin/idris2 $HOME/.idris2/bin/idris2_app/*
|
|
|
|
- name: Build self-hosted
|
2021-05-27 13:57:39 +03:00
|
|
|
run: make all IDRIS2_BOOT="idris2 -Werror" && make install
|
2021-01-20 23:15:24 +03:00
|
|
|
- name: Test self-hosted
|
|
|
|
run: make test INTERACTIVE=''
|
|
|
|
|
2021-06-29 21:42:48 +03:00
|
|
|
ubuntu-self-host-previous-version:
|
|
|
|
needs: quick-check
|
2021-01-20 23:15:24 +03:00
|
|
|
runs-on: ubuntu-latest
|
|
|
|
env:
|
|
|
|
IDRIS2_CG: chez
|
|
|
|
steps:
|
|
|
|
- name: Checkout
|
|
|
|
uses: actions/checkout@v2
|
|
|
|
- name: Download Idris2 Artifact
|
|
|
|
uses: actions/download-artifact@v2
|
|
|
|
with:
|
2021-06-29 21:42:48 +03:00
|
|
|
name: ubuntu-installed-idris2-${{ env.IDRIS2_VERSION }}-chez
|
2021-01-20 23:15:24 +03:00
|
|
|
path: ~/.idris2/
|
|
|
|
- name: Install build dependencies
|
|
|
|
run: |
|
2021-06-15 16:31:31 +03:00
|
|
|
echo "deb http://security.ubuntu.com/ubuntu hirsute universe" | sudo tee -a /etc/apt/sources.list
|
|
|
|
sudo apt-get update
|
|
|
|
sudo apt-get install -y -t hirsute chezscheme
|
2021-05-20 12:21:39 +03:00
|
|
|
echo "$HOME/.idris2/bin" >> $GITHUB_PATH
|
2021-01-20 23:15:24 +03:00
|
|
|
chmod +x $HOME/.idris2/bin/idris2 $HOME/.idris2/bin/idris2_app/*
|
|
|
|
- name: Build self-hosted from previous version
|
2021-05-27 13:57:39 +03:00
|
|
|
run: make all IDRIS2_BOOT="idris2 -Werror" && make install
|
2021-01-20 23:15:24 +03:00
|
|
|
- name: Test self-hosted from previous version
|
|
|
|
run: make test INTERACTIVE=''
|
|
|
|
- name: Artifact Idris2
|
|
|
|
uses: actions/upload-artifact@v2
|
|
|
|
with:
|
2021-02-04 21:41:47 +03:00
|
|
|
name: idris2-nightly-chez
|
2021-01-20 23:15:24 +03:00
|
|
|
path: ~/.idris2/
|
|
|
|
|
2021-06-29 21:42:48 +03:00
|
|
|
######################################################################
|
|
|
|
# Ubuntu API
|
|
|
|
######################################################################
|
|
|
|
|
|
|
|
ubuntu-build-api:
|
|
|
|
needs: ubuntu-bootstrap-chez
|
2021-01-20 23:15:24 +03:00
|
|
|
runs-on: ubuntu-latest
|
|
|
|
env:
|
|
|
|
IDRIS2_CG: chez
|
|
|
|
steps:
|
|
|
|
- name: Checkout
|
|
|
|
uses: actions/checkout@v2
|
|
|
|
- name: Download Idris2 Artifact
|
|
|
|
uses: actions/download-artifact@v2
|
|
|
|
with:
|
2021-06-29 21:42:48 +03:00
|
|
|
name: ubuntu-installed-bootstrapped-idris2-chez
|
2021-01-20 23:15:24 +03:00
|
|
|
path: ~/.idris2/
|
|
|
|
- name: Install build dependencies
|
|
|
|
run: |
|
2021-06-15 16:31:31 +03:00
|
|
|
echo "deb http://security.ubuntu.com/ubuntu hirsute universe" | sudo tee -a /etc/apt/sources.list
|
|
|
|
sudo apt-get update
|
|
|
|
sudo apt-get install -y -t hirsute chezscheme
|
2021-05-20 12:21:39 +03:00
|
|
|
echo "$HOME/.idris2/bin" >> $GITHUB_PATH
|
2021-01-20 23:15:24 +03:00
|
|
|
chmod +x $HOME/.idris2/bin/idris2 $HOME/.idris2/bin/idris2_app/*
|
|
|
|
- name: Build API
|
|
|
|
run: make install-api
|
|
|
|
shell: bash
|
|
|
|
- name: Test API
|
|
|
|
run: cd tests/idris2/api001 && ./run idris2
|
|
|
|
shell: bash
|