|
| 1 | +name: Linux workflow |
| 2 | +on: |
| 3 | + push: |
| 4 | + branches: |
| 5 | + - main |
| 6 | + pull_request: |
| 7 | + branches: |
| 8 | + - main |
| 9 | + |
| 10 | +jobs: |
| 11 | + build: |
| 12 | + runs-on: ubuntu-latest |
| 13 | + name: build (${{ matrix.config.name }}) |
| 14 | + strategy: |
| 15 | + matrix: |
| 16 | + config: |
| 17 | + - name: ubuntu-gcc-24.04 |
| 18 | + container: "ghcr.io/scrubbbbs/ubuntu:24.04" |
| 19 | + #deps: "" |
| 20 | + deps: "libquazip1-qt6-dev" |
| 21 | + #cmake_flags: "-DENABLE_QUAZIP=ON -DUSE_SYSTEM_QUAZIP=OFF" |
| 22 | + cmake_flags: "-DENABLE_QUAZIP=ON" |
| 23 | + env: "CC=gcc CXX=g++" |
| 24 | + |
| 25 | + container: |
| 26 | + image: ${{ matrix.config.container }} |
| 27 | + credentials: |
| 28 | + username: ${{ github.actor }} |
| 29 | + password: ${{ secrets.GITHUB_TOKEN }} |
| 30 | + |
| 31 | + steps: |
| 32 | + - uses: actions/checkout@v4 |
| 33 | + with: |
| 34 | + ref: ${{ github.event.pull_request.head.sha }} |
| 35 | + |
| 36 | + - name: Install build dependencies |
| 37 | + run: | |
| 38 | + sudo apt-get update |
| 39 | + sudo apt-get install -y libexiv2-dev cmake build-essential qt6-base-dev qt6-tools-dev libqt6svg6-dev qt6-image-formats-plugins libgl-dev qt6-l10n-tools ${{ matrix.config.deps }} |
| 40 | +
|
| 41 | + - name: Checkout |
| 42 | + run: | |
| 43 | + clang --version |
| 44 | + gcc --version |
| 45 | + git clone --depth 1 --no-single-branch https://github.com/scrubbbbs/nomacs.git |
| 46 | + cd nomacs |
| 47 | + git checkout appimage-test |
| 48 | + git submodule init |
| 49 | + git submodule update 3rd-party/quazip |
| 50 | + - name: Cmake |
| 51 | + run: | |
| 52 | + cd nomacs/ |
| 53 | + mkdir build |
| 54 | + cd build |
| 55 | + ${{ matrix.config.env }} cmake -G Ninja ${{ matrix.config.cmake_flags }} ../ImageLounge |
| 56 | +
|
| 57 | + - name: Get Build Info |
| 58 | + id: get_version |
| 59 | + shell: bash |
| 60 | + run: | |
| 61 | + cd nomacs/build |
| 62 | + ARCH=$(uname --machine) |
| 63 | + OS=$(source /etc/lsb-release; echo $DISTRIB_ID-$DISTRIB_RELEASE) |
| 64 | + SHA=$(git rev-parse --short ${{ github.event.pull_request.head.sha || github.sha }}) |
| 65 | + VERSION=$(cat DkVersion.h | grep NOMACS_VERSION_STR | sed 's/[^0-9\.]*//g') |
| 66 | + echo "VERSION=${VERSION}-${SHA}-${OS}-${ARCH}" >> $GITHUB_OUTPUT |
| 67 | + echo "ARCH=${ARCH}" >> $GITHUB_OUTPUT |
| 68 | +
|
| 69 | + - name: Compile |
| 70 | + run: | |
| 71 | + cd nomacs/build |
| 72 | + ninja |
| 73 | + ninja check |
| 74 | +
|
| 75 | + - name: AppImage |
| 76 | + run: | |
| 77 | + cd nomacs/build |
| 78 | + ninja appimage |
| 79 | + |
| 80 | + - name: Upload Artifacts |
| 81 | + uses: actions/upload-artifact@v4 |
| 82 | + with: |
| 83 | + name: AppImage ${{ matrix.config.name }} |
| 84 | + path: nomacs/build/nomacs-*.AppImage |
| 85 | + retention-days: 1 |
| 86 | + |
| 87 | + |
0 commit comments