Bump version for reflex-0.9.* #1048
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 all | |
on: | |
push: | |
branches: [ master ] | |
pull_request: | |
branches: [ master ] | |
jobs: | |
build-desktop: | |
name: Build desktop platform | |
# runs-on: ubuntu-latest | |
# steps: | |
# - uses: actions/checkout@v2 | |
# with: | |
# fetch-depth: 0 | |
# - name: Install Nix | |
# uses: cachix/install-nix-action@v15 | |
# with: | |
# nix_path: nixpkgs=channel:nixos-20.09 | |
# - name: Setup cachix | |
# uses: cachix/cachix-action@v10 | |
# with: | |
# name: ergvein | |
# signingKey: ${{ secrets.CACHIX_KEY }} | |
runs-on: self-hosted | |
steps: | |
- name: Restore permissions on repo | |
run: sudo chown -R actions /home/actions/_work/ergvein/ergvein | |
- uses: actions/checkout@v2 | |
with: | |
fetch-depth: 0 | |
- name: Remove Nix | |
run: | | |
sudo systemctl stop nix-daemon.socket || true | |
sudo systemctl stop nix-daemon.service || true | |
sudo systemctl disable nix-daemon.socket || true | |
sudo systemctl disable nix-daemon.service || true | |
sudo systemctl daemon-reload || true | |
sudo mv /etc/profile.d/nix.sh.backup-before-nix /etc/profile.d/nix.sh || true | |
sudo rm -rf /etc/nix/nix.conf || true | |
sudo rm -rf /etc/nix /nix /root/.nix-profile /root/.nix-defexpr /root/.nix-channels /home/actions/.nix-profile /home/actions/.nix-defexpr /home/actions/.nix-channels || true | |
sudo rm -rf /etc/bash.bashrc.backup-before-nix || true | |
sudo rm -rf /etc/bashrc.backup-before-nix || true | |
sudo rm -rf /etc/zshrc.backup-before-nix || true | |
sudo rm -rf /tmp/nix.conf || true | |
sudo apt-get install python -y | |
for i in {1..32} | |
do | |
sudo userdel "nixbld$i" || true | |
done | |
sudo groupdel nixbld || true | |
- name: Install Nix | |
uses: cachix/install-nix-action@v15 | |
with: | |
nix_path: nixpkgs=channel:nixos-20.09 | |
install_options: --daemon-user-count 4 | |
- name: Reload shell | |
run: | | |
source /nix/var/nix/profiles/default/etc/profile.d/nix-daemon.sh | |
source /nix/var/nix/profiles/default/etc/profile.d/nix.sh | |
echo "/nix/var/nix/profiles/per-user/actions/profile/bin" >> $GITHUB_PATH | |
sudo ln -s /nix/var/nix/profiles/per-user/actions /nix/var/nix/profiles/per-user/runner | |
echo "trusted-users = root $USER" | sudo tee -a /etc/nix/nix.conf | |
sudo pkill nix-daemon | |
for n in $(seq 1 20) | |
do | |
if getent passwd nixbld$n > /dev/null 2>&1 | |
then | |
echo "User nixbld$n is already created" | |
else | |
sudo useradd -c "Nix build user $n" -d /var/empty -g nixbld -G nixbld -M -N -r -s "$(which nologin)" nixbld$n | |
fi | |
done | |
- name: Setup cachix | |
uses: cachix/cachix-action@v10 | |
with: | |
name: ergvein | |
signingKey: ${{ secrets.CACHIX_KEY }} | |
- name: Extract git commit hash | |
shell: bash | |
run: echo "##[set-output name=githash;]$(git rev-parse --short HEAD)" | |
id: extract_githash | |
- name: Build indexer server | |
env: | |
GIT_HASH: ${{ steps.extract_githash.outputs.githash }} | |
run: | | |
source /nix/var/nix/profiles/default/etc/profile.d/nix-daemon.sh | |
source /nix/var/nix/profiles/default/etc/profile.d/nix.sh | |
nix-channel --add https://nixos.org/channels/nixos-20.09 nixpkgs | |
nix-channel --update | |
nix-build -A ghc.ergvein-index-server --arg gitHash "\"$GIT_HASH\"" | |
- name: Build desktop wallet | |
env: | |
GIT_HASH: ${{ steps.extract_githash.outputs.githash }} | |
run: | | |
source /nix/var/nix/profiles/default/etc/profile.d/nix-daemon.sh | |
source /nix/var/nix/profiles/default/etc/profile.d/nix.sh | |
nix-channel --add https://nixos.org/channels/nixos-20.09 nixpkgs | |
nix-channel --update | |
nix-build -A ghc.ergvein-wallet --arg gitHash "\"$GIT_HASH\"" | |
build-android: | |
name: Build android platform | |
runs-on: self-hosted | |
steps: | |
- name: Restore permissions on repo | |
run: sudo chown -R actions /home/actions/_work/ergvein/ergvein | |
- uses: actions/checkout@v2 | |
with: | |
fetch-depth: 0 | |
- name: Remove Nix | |
run: | | |
sudo systemctl stop nix-daemon.socket || true | |
sudo systemctl stop nix-daemon.service || true | |
sudo systemctl disable nix-daemon.socket || true | |
sudo systemctl disable nix-daemon.service || true | |
sudo systemctl daemon-reload || true | |
sudo mv /etc/profile.d/nix.sh.backup-before-nix /etc/profile.d/nix.sh || true | |
sudo rm -rf /etc/nix/nix.conf || true | |
sudo rm -rf /etc/nix /nix /root/.nix-profile /root/.nix-defexpr /root/.nix-channels /home/actions/.nix-profile /home/actions/.nix-defexpr /home/actions/.nix-channels || true | |
sudo rm -rf /etc/bash.bashrc.backup-before-nix || true | |
sudo rm -rf /etc/bashrc.backup-before-nix || true | |
sudo rm -rf /etc/zshrc.backup-before-nix || true | |
sudo rm -rf /tmp/nix.conf || true | |
sudo apt-get install python -y | |
for i in {1..32} | |
do | |
sudo userdel "nixbld$i" || true | |
done | |
sudo groupdel nixbld || true | |
- name: Install Nix | |
uses: cachix/install-nix-action@v15 | |
with: | |
nix_path: nixpkgs=channel:nixos-20.09 | |
install_options: --daemon-user-count 4 | |
- name: Reload shell | |
run: | | |
source /nix/var/nix/profiles/default/etc/profile.d/nix-daemon.sh | |
source /nix/var/nix/profiles/default/etc/profile.d/nix.sh | |
echo "/nix/var/nix/profiles/per-user/actions/profile/bin" >> $GITHUB_PATH | |
sudo ln -s /nix/var/nix/profiles/per-user/actions /nix/var/nix/profiles/per-user/runner | |
echo "trusted-users = root $USER" | sudo tee -a /etc/nix/nix.conf | |
sudo pkill nix-daemon | |
for n in $(seq 1 20) | |
do | |
if getent passwd nixbld$n > /dev/null 2>&1 | |
then | |
echo "User nixbld$n is already created" | |
else | |
sudo useradd -c "Nix build user $n" -d /var/empty -g nixbld -G nixbld -M -N -r -s "$(which nologin)" nixbld$n | |
fi | |
done | |
- name: Setup cachix | |
uses: cachix/cachix-action@v10 | |
with: | |
name: ergvein | |
signingKey: ${{ secrets.CACHIX_KEY }} | |
- name: Build android wallet | |
run: | | |
source /nix/var/nix/profiles/default/etc/profile.d/nix-daemon.sh | |
source /nix/var/nix/profiles/default/etc/profile.d/nix.sh | |
nix-channel --add https://nixos.org/channels/nixos-20.09 nixpkgs | |
nix-channel --update | |
./make-android.sh |