|
25 | 25 | permissions: |
26 | 26 | contents: write # for softprops/action-gh-release to create GitHub release |
27 | 27 | # The type of runner that the job will run on |
28 | | - runs-on: ubuntu-latest |
| 28 | + #runs-on: ubuntu-latest |
| 29 | + runs-on: ubuntu-24.04 |
29 | 30 |
|
30 | 31 | # Steps represent a sequence of tasks that will be executed as part of the job |
31 | 32 | steps: |
@@ -35,27 +36,49 @@ jobs: |
35 | 36 | with: |
36 | 37 | fetch-depth: 10 |
37 | 38 |
|
38 | | - - name: Install depencies |
39 | | - run: | |
40 | | - sudo apt update |
41 | | - sudo apt install ccache libssl-dev u-boot-tools python3-mako debhelper fakeroot gcc-arm-linux-gnueabihf gcc-aarch64-linux-gnu make device-tree-compiler libncurses5-dev libelf-dev |
42 | | -
|
43 | 39 | - name: Setup env |
44 | 40 | run: | |
45 | 41 | echo "DT=$(date +'%Y-%m-%d_%H%M')" >> $GITHUB_ENV |
46 | 42 | echo "KERNELVER=$(make kernelversion)" >> $GITHUB_ENV |
47 | 43 | echo "BRANCH=${GITHUB_REF##*/}" >> $GITHUB_ENV |
| 44 | + echo "UBUNTU_MAJOR_VERSION=$(cat /etc/issue | head -1|sed -e 's/^Ubuntu \([0-9]\+\).*$/\1/')" >> $GITHUB_ENV |
| 45 | +
|
| 46 | + - name: Print env |
| 47 | + run: | |
| 48 | + echo $BRANCH $KERNELVER $DT |
| 49 | + echo $UBUNTU_MAJOR_VERSION |
| 50 | +
|
| 51 | + - name: update apt-repos (u22) |
| 52 | + if: env.UBUNTU_MAJOR_VERSION == '22' |
| 53 | + run: | |
| 54 | + cat /etc/apt/sources.list |
| 55 | + sudo sed -i.bak -e 's/^deb/deb [ arch=amd64,i386 ]/' /etc/apt/sources.list |
| 56 | + #deb [arch=amd64,i386] http://archive.ubuntu.com/ubuntu/ jammy main universe |
| 57 | + echo "deb [arch=arm64,armhf] http://ports.ubuntu.com/ubuntu-ports jammy main universe" | sudo tee -a /etc/apt/sources.list |
| 58 | +
|
| 59 | +
|
| 60 | + - name: update apt-repos (u24) |
| 61 | + if: env.UBUNTU_MAJOR_VERSION == '24' |
| 62 | + run: | |
| 63 | + sudo cp /etc/apt/sources.list.d/ubuntu.sources /etc/apt/sources.list.d/ports.sources |
| 64 | + sudo sed -i.bak -e 's/^\(Suites:.*\)$/\1\nArchitectures: amd64 i386/' /etc/apt/sources.list.d/ubuntu.sources |
| 65 | + sudo sed -i.bak -e 's/^URIs:.*$/URIs: http:\/\/ports.ubuntu.com\/ubuntu-ports\//' /etc/apt/sources.list.d/ports.sources |
| 66 | + sudo sed -i -e 's/^\(Suites:.*\)$/\1\nArchitectures: armhf arm64/' /etc/apt/sources.list.d/ports.sources |
| 67 | + cat /etc/apt/sources.list.d/ports.sources |
| 68 | +
|
| 69 | + - name: Install depencies |
| 70 | + run: | |
| 71 | + sudo dpkg --add-architecture armhf |
| 72 | + sudo dpkg --add-architecture arm64 |
| 73 | + sudo apt update |
| 74 | + sudo apt install ccache libssl-dev:armhf libssl-dev:arm64 build-essential u-boot-tools python3-mako debhelper fakeroot gcc-arm-linux-gnueabihf gcc-aarch64-linux-gnu make device-tree-compiler libncurses5-dev libelf-dev |
48 | 75 |
|
49 | 76 | - name: Generate Changelog |
50 | 77 | run: | |
51 | 78 | echo "# CI-Build for $BRANCH ($KERNELVER)" > ${{ github.workspace }}-CHANGELOG.txt |
52 | 79 | echo "last commits:" >> ${{ github.workspace }}-CHANGELOG.txt |
53 | 80 | git log --pretty=format:"%h %ad %s %d by %an" --date=short >> ${{ github.workspace }}-CHANGELOG.txt |
54 | 81 |
|
55 | | - - name: Print env |
56 | | - run: | |
57 | | - echo $BRANCH $KERNELVER $DT |
58 | | -
|
59 | 82 | - name: Setup cache |
60 | 83 | id: cache |
61 | 84 | uses: actions/cache@v4 |
|