Skip to content

Commit

Permalink
chore: gpustack update ci trigger branch add windows platform
Browse files Browse the repository at this point in the history
  • Loading branch information
aiwantaozi committed Jul 2, 2024
1 parent 6920570 commit 3a92e56
Showing 1 changed file with 1 addition and 354 deletions.
355 changes: 1 addition & 354 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -158,164 +158,6 @@ jobs:
name: fastfetch-linux-aarch64
path: ./fastfetch-*.*

<<<<<<< HEAD
linux-armv7:
name: Linux-armv7
runs-on: ubuntu-22.04
permissions:
security-events: write
contents: read
steps:
- name: checkout repository
uses: actions/checkout@v4

- name: run VM
uses: uraimo/run-on-arch-action@v2
id: runcmd
with:
arch: armv7
distro: ubuntu20.04
githubToken: ${{ github.token }}
run: |
uname -a
apt-get update && apt-get install -y wget
# CMake installed by apt has bug `list sub-command REMOVE_ITEM requires two or more arguments`
wget --no-check-certificate https://apt.kitware.com/ubuntu/pool/main/c/cmake/{cmake_3.29.2-0kitware1ubuntu20.04.1_armhf.deb,cmake-data_3.29.2-0kitware1ubuntu20.04.1_all.deb}
dpkg -i *.deb
apt-get install -y make g++ libvulkan-dev libwayland-dev libxrandr-dev libxcb-randr0-dev libdconf-dev libdbus-1-dev libmagickcore-dev libxfconf-0-dev libsqlite3-dev librpm-dev libegl-dev libglx-dev libosmesa6-dev ocl-icd-opencl-dev libnm-dev libpulse-dev libdrm-dev directx-headers-dev rpm
cmake -DSET_TWEAK=Off -DBUILD_TESTS=On -DCMAKE_INSTALL_PREFIX=/usr .
cmake --build . --target package --verbose -j4
./fastfetch --list-features
time ./fastfetch -c presets/ci.jsonc
time ./fastfetch -c presets/ci.jsonc --format json
time ./flashfetch
ldd fastfetch
ctest
- name: upload artifacts
uses: actions/upload-artifact@v4
with:
name: fastfetch-linux-armv7
path: ./fastfetch-*.*

linux-riscv64:
name: Linux-riscv64
runs-on: ubuntu-22.04
permissions:
security-events: write
contents: read
steps:
- name: checkout repository
uses: actions/checkout@v4

- name: run VM
uses: uraimo/run-on-arch-action@v2
id: runcmd
with:
arch: riscv64
distro: ubuntu22.04
githubToken: ${{ github.token }}
run: |
uname -a
apt-get update && apt-get install -y cmake make g++ libvulkan-dev libwayland-dev libxrandr-dev libxcb-randr0-dev libdconf-dev libdbus-1-dev libmagickcore-dev libxfconf-0-dev libsqlite3-dev librpm-dev libegl-dev libglx-dev libosmesa6-dev ocl-icd-opencl-dev libnm-dev libpulse-dev libdrm-dev libddcutil-dev libchafa-dev directx-headers-dev rpm
cmake -DSET_TWEAK=Off -DBUILD_TESTS=On -DCMAKE_INSTALL_PREFIX=/usr .
cmake --build . --target package --verbose -j4
./fastfetch --list-features
time ./fastfetch -c presets/ci.jsonc
time ./fastfetch -c presets/ci.jsonc --format json
time ./flashfetch
ldd fastfetch
ctest
- name: upload artifacts
uses: actions/upload-artifact@v4
with:
name: fastfetch-linux-riscv64
path: ./fastfetch-*.*

musl-amd64:
name: Musl-amd64
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4

- name: setup alpine linux
uses: jirutka/setup-alpine@master
with:
branch: v3.19

- name: install dependencies
run: |
cat /etc/alpine-release
uname -a
apk add cmake samurai vulkan-loader-dev libxcb-dev wayland-dev libdrm-dev dconf-dev imagemagick-dev chafa-dev zlib-dev dbus-dev mesa-dev opencl-dev xfconf-dev sqlite-dev networkmanager-dev pulseaudio-dev ddcutil-dev gcc g++
shell: alpine.sh --root {0}

- name: build
run: |
cmake -DSET_TWEAK=Off -DBUILD_TESTS=On -DCMAKE_INSTALL_PREFIX=/usr -DIS_MUSL=ON -GNinja .
cmake --build . --target package --verbose -j4
shell: alpine.sh {0}

- name: run
run: |
./fastfetch --list-features
time ./fastfetch -c presets/ci.jsonc
time ./fastfetch -c presets/ci.jsonc --format json
time ./flashfetch
ldd fastfetch
ctest
shell: alpine.sh {0}

- name: upload artifacts
uses: actions/upload-artifact@v4
with:
name: fastfetch-musl-amd64
path: ./fastfetch-*.*

musl-aarch64:
name: Musl-aarch64
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4

- name: setup alpine linux
uses: jirutka/setup-alpine@master
with:
branch: v3.19
arch: aarch64

- name: install dependencies
run: |
cat /etc/alpine-release
uname -a
apk add cmake samurai vulkan-loader-dev libxcb-dev wayland-dev libdrm-dev dconf-dev imagemagick-dev chafa-dev zlib-dev dbus-dev mesa-dev opencl-dev xfconf-dev sqlite-dev networkmanager-dev pulseaudio-dev ddcutil-dev gcc g++
shell: alpine.sh --root {0}

- name: build
run: |
cmake -DSET_TWEAK=Off -DBUILD_TESTS=On -DCMAKE_INSTALL_PREFIX=/usr -DIS_MUSL=ON -GNinja .
cmake --build . --target package --verbose -j4
shell: alpine.sh {0}

- name: run
run: |
./fastfetch --list-features
time ./fastfetch -c presets/ci.jsonc
time ./fastfetch -c presets/ci.jsonc --format json
time ./flashfetch
ldd fastfetch
ctest
shell: alpine.sh {0}

- name: upload artifacts
uses: actions/upload-artifact@v4
with:
name: fastfetch-musl-aarch64
path: ./fastfetch-*.*

=======
>>>>>>> 70dcc44e (chore: gpustack update ci)
macos-universal:
name: macOS-universal
runs-on: macos-12
Expand Down Expand Up @@ -370,116 +212,6 @@ jobs:
with:
name: fastfetch-macos-universal
path: ./fastfetch-*.*

<<<<<<< HEAD
sunos-amd64:
runs-on: ubuntu-latest
name: SunOS-amd64
steps:
- name: checkout repository
uses: actions/checkout@v4

- uses: actions/checkout@v4
- name: run VM
uses: vmactions/omnios-vm@v1
with:
usesh: true
prepare: |
uname -a
pkg update --accept
pkg install gcc13 cmake git pkg-config glib2 dbus sqlite-3 imagemagick
run: |
cmake -DSET_TWEAK=Off -DBUILD_TESTS=On .
cmake --build . --target package --verbose -j4
./fastfetch --list-features
time ./fastfetch
time ./fastfetch --format json
time ./flashfetch
ldd fastfetch
ctest
cpack
- name: upload artifacts
uses: actions/upload-artifact@v4
with:
name: fastfetch-sunos-amd64
path: ./fastfetch-*.*

freebsd-amd64:
name: FreeBSD-amd64
runs-on: ubuntu-latest
permissions:
security-events: write
contents: read
steps:
- name: checkout repository
uses: actions/checkout@v4

- name: run VM
uses: cross-platform-actions/action@master
with:
operating_system: freebsd
architecture: x86-64
cpu_count: 3
shell: bash
version: '13.2'
run: |
uname -a
sudo pkg update
sudo pkg install -y cmake git pkgconf binutils wayland vulkan-headers vulkan-loader libxcb libXrandr libX11 libdrm glib dconf dbus sqlite3-tcl xfce4-conf ImageMagick6 ImageMagick7 chafa egl libosmesa opencl ocl-icd v4l_compat
cmake -DSET_TWEAK=Off -DBUILD_TESTS=On .
cmake --build . --target package --verbose -j4
./fastfetch --list-features
time ./fastfetch
time ./fastfetch --format json
time ./flashfetch
ldd fastfetch
ctest
- name: upload artifacts
uses: actions/upload-artifact@v4
with:
name: fastfetch-freebsd-amd64
path: ./fastfetch-*.*

freebsd-aarch64:
name: FreeBSD-aarch64
runs-on: ubuntu-latest
permissions:
security-events: write
contents: read
steps:
- name: checkout repository
uses: actions/checkout@v4

- name: run VM
uses: cross-platform-actions/action@master
with:
operating_system: freebsd
architecture: arm64
cpu_count: 3
shell: bash
version: '13.2'
run: |
uname -a
sudo pkg update
sudo pkg install -y cmake git pkgconf binutils wayland vulkan-headers vulkan-loader libxcb libXrandr libX11 libdrm glib dconf dbus sqlite3-tcl xfce4-conf ImageMagick6 ImageMagick7 chafa egl libosmesa opencl ocl-icd v4l_compat
cmake -DSET_TWEAK=Off -DBUILD_TESTS=On .
cmake --build . --target package --verbose -j4
./fastfetch --list-features
time ./fastfetch
time ./fastfetch --format json
time ./flashfetch
ldd fastfetch
ctest
- name: upload artifacts
uses: actions/upload-artifact@v4
with:
name: fastfetch-freebsd-aarch64
path: ./fastfetch-*.*

windows-amd64:
name: Windows-amd64
runs-on: windows-latest
Expand Down Expand Up @@ -544,100 +276,15 @@ jobs:
with:
name: fastfetch-windows-amd64
path: ./fastfetch-windows-amd64.*

windows-i686:
name: Windows-i686
runs-on: windows-latest
permissions:
security-events: write
contents: read
defaults:
run:
shell: msys2 {0}
steps:
- name: checkout repository
uses: actions/checkout@v4

- name: setup-msys2
uses: msys2/setup-msys2@v2
with:
msystem: CLANG32
update: true
install: git p7zip mingw-w64-clang-i686-cmake mingw-w64-clang-i686-clang mingw-w64-clang-i686-vulkan-loader mingw-w64-clang-i686-vulkan-headers mingw-w64-clang-i686-opencl-icd mingw-w64-clang-i686-opencl-headers

- name: print msys version
run: uname -a

- name: Initialize CodeQL
uses: github/codeql-action/init@v3
with:
languages: c, cpp

- name: configure project
run: env PKG_CONFIG_PATH=/clang32/lib/pkgconfig/:$PKG_CONFIG_PATH cmake -DSET_TWEAK=Off -DBUILD_TESTS=On .

- name: build project
run: cmake --build . --verbose -j4

- name: perform CodeQL analysis
uses: github/codeql-action/analyze@v3

- name: copy necessary dlls
run: cp /clang32/bin/{OpenCL,vulkan-1}.dll .

- name: download amd_ags
run: curl -LO https://github.com/GPUOpen-LibrariesAndSDKs/AGS_SDK/raw/master/ags_lib/lib/amd_ags_x86.dll

- name: run fastfetch
run: time ./fastfetch -c presets/ci.jsonc

- name: run fastfetch --format json
run: time ./fastfetch -c presets/ci.jsonc --format json

- name: run flashfetch
run: time ./flashfetch

- name: print dependencies
run: ldd fastfetch

- name: run tests
run: ctest

- name: create zip archive
run: 7z a -tzip -mx9 -bd -y fastfetch-windows-i686.zip LICENSE *.dll fastfetch.exe flashfetch.exe presets

- name: create 7z archive
run: 7z a -t7z -mx9 -bd -y fastfetch-windows-i686.7z LICENSE *.dll fastfetch.exe flashfetch.exe presets

- name: upload artifacts
uses: actions/upload-artifact@v4
with:
name: fastfetch-windows-i686
path: ./fastfetch-windows-i686.*

=======
>>>>>>> 70dcc44e (chore: gpustack update ci)
release:
if: github.event_name == 'push' && github.ref == 'refs/heads/gpustack-main' && github.repository == 'aiwantaozi/fastfetch'
if: github.event_name == 'push' && (github.ref == 'refs/heads/gpustack-main' || contains(github.ref, 'gpustack-release') ) && github.repository == 'aiwantaozi/fastfetch'
name: Release
runs-on: ubuntu-latest
needs:
- linux-amd64
- linux-aarch64
<<<<<<< HEAD
- linux-armv7
- linux-riscv64
- musl-amd64
- musl-aarch64
- macos-universal
- freebsd-amd64
- freebsd-aarch64
- sunos-amd64
- windows-amd64
- windows-i686
=======
- macos-universal
>>>>>>> 70dcc44e (chore: gpustack update ci)
permissions:
contents: write
steps:
Expand Down

0 comments on commit 3a92e56

Please sign in to comment.