!UUYziobKGGxpovWyAN:nixos.org

Robotnix

247 Members
Build Android (AOSP) using Nix | https://github.com/danielfullmer/robotnix76 Servers

Load older messages


SenderMessageTime
8 Sep 2021
@kranzes:matrix.orgkranzesRuns automatically every 3 days and creates a commit13:51:03
@kranzes:matrix.orgkranzesI will try to make something similar that will work for both 17.1 and 18.1 on official robotnix 13:51:47
@kranzes:matrix.orgkranzesthen create a PR13:51:50
@kranzes:matrix.orgkranzesThis is my first time ever using github actions but it seems to be working fine13:52:43
@kranzes:matrix.orgkranzes danielrf: how do you generate a format like 2021.08.10.22 from date +%s? 14:19:25
@kranzes:matrix.orgkranzesRight now im stuck at the point where im trying to create the git commit in that format according to the buildDateTime14:21:51
@kranzes:matrix.orgkranzes

so far i made this

name: "Update LineageOS"

on: { schedule: [{ cron: '0 0 */3 * *' }], workflow_dispatch }

jobs:
  updates:
    name: "Update LineageOS"
    runs-on: ubuntu-latest
    steps:
    - uses: actions/checkout@v2.3.4
      with:
        fetch-depth: 0
    - uses: cachix/install-nix-action@v13
      with:
        install_url: https://github.com/numtide/nix-flakes-installer/releases/download/nix-2.4pre20210823_af94b54/install
        extra_nix_config: |
          experimental-features = nix-command flakes
    # Update lineage-18.1
    - run: nix develop -c ./flavors/lineageos/update.sh lineage-18.1
    # Update lineage-17.1
    - run: nix develop -c ./flavors/lineageos/update.sh lineage-17.1
    # Update buildDateTime
    - run: sed -i "s/buildDateTime = mkDefault .*/buildDateTime = mkDefault $(date +%s);/" flavors/lineageos/default.nix
    - uses: EndBug/add-and-commit@v7.3.0
      with:
        author_name: CHANGEME
        author_email: CHANGEME
        message: 'lineageos: '
        add: 'flavors/lineageos/{default.nix,lineage-18.1,lineage-17.1}'
14:24:58
@kranzes:matrix.orgkranzesI got it14:35:03
@kranzes:matrix.orgkranzes

danielrf:

name: "Update LineageOS"

on: { schedule: [{ cron: '0 0 * * 0' }], workflow_dispatch }

jobs:
  updates:
    name: "Update LineageOS"
    runs-on: ubuntu-latest
    steps:
    - uses: actions/checkout@v2.3.4
      with:
        fetch-depth: 0
    - uses: cachix/install-nix-action@v13
      with:
        install_url: https://github.com/numtide/nix-flakes-installer/releases/download/nix-2.4pre20210823_af94b54/install
        extra_nix_config: |
          experimental-features = nix-command flakes
    # Update lineage-18.1
    - run: nix develop -c ./flavors/lineageos/update.sh lineage-18.1
    # Update lineage-17.1
    - run: nix develop -c ./flavors/lineageos/update.sh lineage-17.1
    # Generate date
    - env:
        DATE: $(date +%s)
    # Update buildDateTime
    - run: sed -i "s/buildDateTime = mkDefault .*/buildDateTime = mkDefault $DATE;/" flavors/lineageos/default.nix
    - uses: EndBug/add-and-commit@v7.3.0
      with:
        author_name: danielfullmer
        message: 'lineageos: $(date +%Y.%m.%d.%H -d @$DATE)'
        add: '["flavors/lineageos/default.nix","flavors/lineageos/lineage-18.1","flavors/lineageos/lineage-17.1"]'
        tag: 'lineageos-$(date +%Y.%m.%d.%H -d @$DATE)'
15:34:06
@kranzes:matrix.orgkranzesThis should be ready15:34:13
@kranzes:matrix.orgkranzes * This should be good15:34:17
@kranzes:matrix.orgkranzesI tested the commands manually, i havent tested this exact workflow as a whole15:36:11
@kranzes:matrix.orgkranzesCould you give it a try?15:36:19
@danielrf:matrix.orgdanielrf kranzes: The buildNumber is set by default to a string representation of the buildDateTime: https://github.com/danielfullmer/robotnix/blob/360a68fa7a28da386779582ae1120274c750d9de/modules/base.nix#L216 16:17:58
@danielrf:matrix.orgdanielrf You can extract this by evaluating an image. See, for example, scripts/release-tag.sh. 16:18:33
@danielrf:matrix.orgdanielrf There I get the buildNumber to use when tagging via: nix eval -f . --arg configuration "{flavor=\"$FLAVOR\";}" --raw config.buildNumber 16:19:05
@danielrf:matrix.orgdanielrf For something like this, we'd want to grab the buildNumber before and after changing the buildDateTime so we can make a nice commit message like: <flavor>: <prevBuildNumber> -> <newBuildNumber> 16:20:00
@danielrf:matrix.orgdanielrfI'll try to take a closer look at this github action soon. A CI-based auto-update has been a feature I've wanted for a while, but up until now I've just been trying to get the update scripts robust enough. I also need to look into if we'd run into bandwidth/time limits using Github actions like this.16:23:26
@danielrf:matrix.orgdanielrf cde: Hi, I've got a barbet image built if you're available to test: https://drive.google.com/file/d/1sCIjrZcoORd9PdVebqdRr88JncbNX3OO/view?usp=sharing 16:24:00
@cdesai:matrix.orgcdedownloading16:24:38
@cdesai:matrix.orgcdeavb key?16:26:40
@danielrf:matrix.orgdanielrfIt's an unsigned image16:26:51
@danielrf:matrix.orgdanielrfeh--hold off for a sec16:28:17
@danielrf:matrix.orgdanielrfI should provide a full signed image that tests AVB too16:28:28
@cdesai:matrix.orgcdetoo late16:28:29
@danielrf:matrix.orgdanielrflol16:28:34
@cdesai:matrix.orgcdeboots16:31:16
@cdesai:matrix.orgcdeseeing this wallpaper after so long16:31:22
@cdesai:matrix.orgcdeonly 10 apps, 1 of them being chromium which you build - sad state of aosp.16:31:50
@danielrf:matrix.orgdanielrfhaha, yep thats AOSP. Still salty that google lets its AOSP apps languish and focuses instead on their closed-source ones16:33:20

There are no newer messages yet.


Back to Room ListRoom Version: 6