Update guix.yml #4
This file contains hidden or 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: Guix shell test | |
on: | |
push: | |
paths: | |
- '**.scm' | |
- '.github/workflows/**' | |
pull_request: | |
jobs: | |
guix-test: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout repository | |
uses: actions/checkout@v4 | |
- name: Install dependencies | |
run: | | |
sudo apt-get update | |
sudo apt-get install -y curl gnupg2 locales git | |
- name: Set up locale | |
run: | | |
sudo locale-gen en_US.UTF-8 | |
echo 'LANG=en_US.UTF-8' >> $GITHUB_ENV | |
- name: Download and install Guix | |
run: | | |
curl -LO https://ftp.gnu.org/gnu/guix/guix-binary-1.4.0.x86_64-linux.tar.xz | |
tar -xf guix-binary-1.4.0.x86_64-linux.tar.xz | |
sudo mv gnu /gnu | |
sudo mv var/guix /var/guix | |
# Установим профиль | |
profile=$(readlink -f /gnu/store/*-guix-profile) | |
echo "$profile/bin" >> $GITHUB_PATH | |
echo "GUIX_PROFILE=$profile" >> $GITHUB_ENV | |
echo "GUIX_LOCPATH=$profile/lib/locale" >> $GITHUB_ENV | |
- name: Create guix build users | |
run: | | |
sudo groupadd --system guixbuild | |
for i in $(seq -w 1 10); do | |
sudo useradd -g guixbuild -G guixbuild -N -M -r -s "$(which nologin)" guixbuilder$i | |
done | |
- name: Start guix-daemon | |
run: | | |
profile=$(readlink -f /gnu/store/*-guix-profile) | |
sudo "$profile/bin/guix-daemon" --build-users-group=guixbuild --disable-chroot & | |
sleep 5 | |
- name: Run guix shell | |
run: | | |
guix shell -L . ksh93u+m -- ksh --version |