version 2.6.91 #131
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: Build Debian packages | |
| on: | |
| push: | |
| branches: [ '*' ] | |
| tags: [ '*' ] | |
| pull_request: | |
| branches: [ master ] | |
| env: | |
| HORIZON_VERSION: 2.6.91 | |
| HORIZON_PKG_VERSION: 1 | |
| DEBIAN_FRONTEND: noninteractive | |
| LANG: en_US.UTF-8 | |
| LANGUAGE: en_US.UTF-8 | |
| LC_ALL: en_US.UTF-8 | |
| jobs: | |
| build: | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| os: | |
| - distro: debian | |
| release: trixie | |
| - distro: debian | |
| release: bullseye | |
| - distro: debian | |
| release: bookworm | |
| - distro: ubuntu | |
| release: plucky | |
| - distro: ubuntu | |
| release: focal | |
| - distro: ubuntu | |
| release: jammy | |
| - distro: ubuntu | |
| release: noble | |
| - distro: ubuntu | |
| release: oracular | |
| runs-on: ubuntu-latest | |
| container: ${{ matrix.os.distro }}:${{ matrix.os.release }} | |
| steps: | |
| - name: check if master branch | |
| if: ${{ github.ref == 'refs/heads/master' }} | |
| run: echo "Building branch ${{ github.ref }}" | |
| - uses: actions/checkout@v2 | |
| - name: update apt cache | |
| run: apt-get update | |
| - name: generate locales | |
| run: | | |
| apt-get install -y locales | |
| echo "${{ env.LANG }} UTF-8" > /etc/locale.gen | |
| locale-gen | |
| - name: install build utils | |
| run: apt-get install -y devscripts build-essential lintian wget debhelper curl jq reprepro gnupg rsync meson cmake | |
| - name: import gpg key | |
| run: | | |
| echo "${{ secrets.GPG_KEY}}" | gpg --import | |
| gpg --list-keys | |
| - name: install dependencies | |
| run: apt-get install -y git build-essential libsqlite3-dev util-linux librsvg2-dev libcairomm-1.0-dev libepoxy-dev libgtkmm-3.0-dev uuid-dev libzmq5 libzmq3-dev libglm-dev libgit2-dev libcurl4-gnutls-dev libpodofo-dev python3 libarchive-dev libspnav-dev git libdxflib-dev | |
| - name: Install opencascade | |
| run: apt-get install liboce-ocaf-dev -y | |
| if: ${{ matrix.os.release != 'noble' && matrix.os.release != 'oracular' && matrix.os.release != 'plucky' && matrix.os.release != 'trixie' }} | |
| - name: Install opencascade | |
| run: apt-get install libocct-ocaf-dev libocct-data-exchange-dev -y | |
| if: ${{ matrix.os.release == 'noble' || matrix.os.release == 'oracular' || matrix.os.release == 'plucky' || matrix.os.release == 'trixie' }} | |
| - name: download tarball | |
| run: wget https://github.com/horizon-eda/horizon/archive/v${HORIZON_VERSION}.tar.gz -O horizon-eda-upstream_${HORIZON_VERSION}.orig.tar.gz | |
| - name: unpack tarball and add debian directory | |
| run: | | |
| tar xzf horizon-eda-upstream_${HORIZON_VERSION}.orig.tar.gz | |
| mv horizon-${HORIZON_VERSION} horizon-eda-upstream-${HORIZON_VERSION} | |
| cp -r debian horizon-eda-upstream-${HORIZON_VERSION} | |
| - name: patch debian/control opencascade package names | |
| run: sed -i "s/liboce-ocaf-dev,/libocct-ocaf-dev,\\n libocct-data-exchange-dev,/" horizon-eda-upstream-${HORIZON_VERSION}/debian/control | |
| if: ${{ matrix.os.release == 'noble' || matrix.os.release == 'oracular' || matrix.os.release == 'plucky' || matrix.os.release == 'trixie' }} | |
| - name: run debuild | |
| run: debuild -uc -us | |
| working-directory: horizon-eda-upstream-${{ env. HORIZON_VERSION }} | |
| - name: list files | |
| run: ls | |
| - name: upload debian packages | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: packages-${{ matrix.os.distro }}-${{ matrix.os.release }} | |
| path: ./*.*deb | |
| - name: upload debian source files | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: source-packages-${{ matrix.os.distro }}-${{ matrix.os.release }} | |
| path: | | |
| *.dsc | |
| *.debian.tar.* | |
| *.orig.tar.* | |
| - name: create repo and push to selfnet mirror | |
| if: ${{ github.ref == 'refs/heads/master' }} | |
| run: | | |
| sed -i 's/Codename:.*/Codename: ${{ matrix.os.release }}/' repo/conf/distributions | |
| cd repo | |
| reprepro includedeb ${{ matrix.os.release }} ../*.deb | |
| find | |
| RSYNC_PASSWORD=${{ secrets.RSYNC_PASSWORD }} rsync -avz --stats --exclude=db --exclude=conf --delete-after ./ rsync://[email protected]/horizon-eda/${{ matrix.os.distro }}-${{ matrix.os.release }}/ |