mirror of
https://github.com/feather-wallet/feather.git
synced 2025-01-18 16:54:33 +00:00
add github workflow for guix builds
This commit is contained in:
parent
e746ccd6f0
commit
e63c4a6664
2 changed files with 95 additions and 0 deletions
94
.github/workflows/guix.yml
vendored
Normal file
94
.github/workflows/guix.yml
vendored
Normal file
|
@ -0,0 +1,94 @@
|
||||||
|
name: ci/gh-actions/guix
|
||||||
|
|
||||||
|
on:
|
||||||
|
push:
|
||||||
|
|
||||||
|
env:
|
||||||
|
APT_SET_CONF: |
|
||||||
|
echo "Acquire::Retries \"3\";" | sudo tee -a /etc/apt/apt.conf.d/80-custom
|
||||||
|
echo "Acquire::http::Timeout \"120\";" | sudo tee -a /etc/apt/apt.conf.d/80-custom
|
||||||
|
echo "Acquire::ftp::Timeout \"120\";" | sudo tee -a /etc/apt/apt.conf.d/80-custom
|
||||||
|
jobs:
|
||||||
|
build-cross:
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
strategy:
|
||||||
|
fail-fast: false
|
||||||
|
matrix:
|
||||||
|
toolchain:
|
||||||
|
- name: "x86_64-linux-gnu"
|
||||||
|
host: "x86_64-linux-gnu"
|
||||||
|
- name: "x86_64-linux-gnu.no-tor-bundle"
|
||||||
|
host: "x86_64-linux-gnu.no-tor-bundle"
|
||||||
|
- name: "aarch64-linux-gnu"
|
||||||
|
host: "aarch64-linux-gnu"
|
||||||
|
- name: "arm-linux-gnueabihf"
|
||||||
|
host: "arm-linux-gnueabihf"
|
||||||
|
- name: "riscv64-linux-gnu"
|
||||||
|
host: "riscv64-linux-gnu"
|
||||||
|
- name: "x86_64-w64-mingw32"
|
||||||
|
host: "x86_64-w64-mingw32"
|
||||||
|
- name: "x86_64-w64-mingw32.installer"
|
||||||
|
host: "x86_64-w64-mingw32.installer"
|
||||||
|
- name: "x86_64-apple-darwin"
|
||||||
|
host: "x86_64-apple-darwin"
|
||||||
|
- name: "arm64-apple-darwin"
|
||||||
|
host: "arm64-apple-darwin"
|
||||||
|
name: ${{ matrix.toolchain.name }}
|
||||||
|
steps:
|
||||||
|
- uses: actions/checkout@v3
|
||||||
|
with:
|
||||||
|
fetch-depth: 0
|
||||||
|
submodules: recursive
|
||||||
|
- name: guix cache
|
||||||
|
uses: actions/cache@v3
|
||||||
|
with:
|
||||||
|
path: |
|
||||||
|
gnu/store
|
||||||
|
guix_db.sqlite
|
||||||
|
key: depends-${{ matrix.toolchain.host }}-${{ hashFiles('contrib/guix/manifest.scm') }}
|
||||||
|
restore-keys: |
|
||||||
|
depends-${{ matrix.toolchain.host }}-${{ hashFiles('contrib/guix/manifest.scm') }}
|
||||||
|
depends-${{ matrix.toolchain.host }}-
|
||||||
|
- name: move guix store
|
||||||
|
run: |
|
||||||
|
if [[ -e "guix_db.sqlite" ]]; then
|
||||||
|
sudo mkdir -p /var/guix/db
|
||||||
|
sudo mv gnu /gnu
|
||||||
|
sudo cp guix_db.sqlite /var/guix/db/db.sqlite
|
||||||
|
|
||||||
|
sudo chmod 1775 /gnu/store
|
||||||
|
sudo chown 0644 /var/guix/db/db.sqlite
|
||||||
|
sudo chown -R root:root /gnu/store /var/guix/db/db.sqlite
|
||||||
|
fi
|
||||||
|
- name: depends cache
|
||||||
|
uses: actions/cache@v3
|
||||||
|
with:
|
||||||
|
path: contrib/depends/built
|
||||||
|
key: depends-${{ matrix.toolchain.host }}-${{ hashFiles('contrib/depends/packages/*') }}
|
||||||
|
restore-keys: |
|
||||||
|
depends-${{ matrix.toolchain.host }}-${{ hashFiles('contrib/depends/packages/*') }}
|
||||||
|
depends-${{ matrix.toolchain.host }}-
|
||||||
|
- name: depends sources cache
|
||||||
|
uses: actions/cache@v3
|
||||||
|
with:
|
||||||
|
path: contrib/depends/sources
|
||||||
|
key: depends-${{ matrix.toolchain.host }}-${{ hashFiles('contrib/depends/packages/*') }}
|
||||||
|
restore-keys: |
|
||||||
|
depends-${{ matrix.toolchain.host }}-${{ hashFiles('contrib/depends/packages/*') }}
|
||||||
|
depends-${{ matrix.toolchain.host }}-
|
||||||
|
- name: set apt conf
|
||||||
|
run: ${{env.APT_SET_CONF}}
|
||||||
|
- name: install dependencies
|
||||||
|
run: sudo apt update; sudo apt -y install guix git ca-certificates ${{ matrix.toolchain.packages }}
|
||||||
|
- name: build
|
||||||
|
run: SUBSTITUTE_URLS='http://ci.guix.gnu.org' HOSTS="${{ matrix.toolchain.host }}" JOBS=2 ./contrib/guix/guix-build
|
||||||
|
- uses: actions/upload-artifact@v3
|
||||||
|
with:
|
||||||
|
name: ${{ matrix.toolchain.name }}
|
||||||
|
path: |
|
||||||
|
guix/guix-build-*/output/${{ matrix.toolchain.host }}/*
|
||||||
|
- name: prepare guix store for caching
|
||||||
|
run: |
|
||||||
|
sudo systemctl stop guix-daemon
|
||||||
|
sudo mv /gnu gnu
|
||||||
|
sudo mv /var/guix/db/db.sqlite guix_db.sqlite
|
|
@ -353,6 +353,7 @@ EOF
|
||||||
--container \
|
--container \
|
||||||
--pure \
|
--pure \
|
||||||
--no-cwd \
|
--no-cwd \
|
||||||
|
${SUBSTITUTE_URLS:+--substitute-urls="$SUBSTITUTE_URLS"} \
|
||||||
-- env HOST="$HOST"
|
-- env HOST="$HOST"
|
||||||
|
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue