forked from Eeems-Org/oxide
-
Notifications
You must be signed in to change notification settings - Fork 0
63 lines (59 loc) · 2 KB
/
build.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
name: Build oxide
on: [push, pull_request]
jobs:
build:
name: Build and package
runs-on: ubuntu-latest
steps:
- uses: actions/[email protected]
- uses: cachix/install-nix-action@v12
with:
nix_path: nixpkgs=channel:nixos-unstable
- uses: cachix/cachix-action@v8
with:
name: nix-remarkable
signingKey: '${{ secrets.CACHIX_SIGNING_KEY }}'
- name: Build
run: nix-build --argstr system 'x86_64-linux'
timeout-minutes: 15
- run: mkdir -p oxide && cp -a result/. oxide
- name: Save the build
uses: actions/upload-artifact@v2
with:
name: oxide
path: oxide
- name: Checkout toltec Git repository
uses: actions/checkout@v2
with:
repository: toltec-dev/toltec.git
ref: stable
path: toltec
- name: Setup Python
uses: actions/setup-python@v2
with:
python-version: '3.8'
- name: Link requirements.txt
run: |
ln -s "$GITHUB_WORKSPACE"/toltec/requirements.txt requirements.txt
- name: Setup Toltec dependencies
uses: ./toltec/.github/actions/setup
- name: Package
run: |
rm -rf "$GITHUB_WORKSPACE"/toltec/package/oxide/*
echo "r$(git rev-list --count HEAD).$(git rev-parse --short HEAD)" > "$GITHUB_WORKSPACE"/toltec/package/oxide/version.txt
cd "$GITHUB_WORKSPACE"/toltec/package/oxide
tar -czvf ./oxide.tar.gz "$GITHUB_WORKSPACE"/result/*
cp "$GITHUB_WORKSPACE"/package .
sudo apt-get install bsdtar tree
cd "$GITHUB_WORKSPACE"/toltec
make oxide
mkdir "$GITHUB_WORKSPACE"/output
find . -name '*.ipk' | while read -r file; do
cp "$file" "$GITHUB_WORKSPACE/output/$(basename $file)"
done
timeout-minutes: 15
- name: Save the packages
uses: actions/upload-artifact@v2
with:
name: packages
path: output