Skip to content

2.6.0

2.6.0 #20

Workflow file for this run

name: Build on Ubuntu LTS
on:
# schedule:
# # * is a special character in YAML so you have to quote this string
# - cron: '0 0 9 4 *' # every year's 04-09 (April 9th)
workflow_dispatch:
push:
branches:
- ci
jobs:
build_cic:
name: Build CIC
runs-on: ubuntu-20.04
steps:
- name: git checkout
uses: actions/checkout@master
- name: Show some info
run: |
uname -a
cat /etc/os-release
pwd
ls -la
git branch -a
git fetch origin binaries
git branch -a
git config user.name bot
git config user.email bot@github.bot.none
git config --list
env
dpkg --list
df -Th
mount
echo $$
ps axfj
cat /proc/cpuinfo
- name: Install cargo vulkan xkb
run: |
sudo apt-get install -y cargo libvulkan-dev libxcb-xkb-dev libxkbcommon-dev libxkbcommon-x11-dev libxkbfile-dev
- name: Install Qt
uses: jurplel/install-qt-action@v3
with:
version: '6.3.1'
host: 'linux'
target: 'desktop'
# dir: ${{ github.workspace }}/qt/
modules: 'qtimageformats'
archives: " qttools qtsvg qtbase icu qttranslations qtdeclarative"
setup-python: 'false'
- name: Show info after install Qt6
run: |
dpkg --list
df -Th
- name: Show files after install Qt 6
run: |
find $RUNNER_WORKSPACE
# find /usr
- name: Download CIC source
run: |
wget https://github.com/Lymphatus/caesium-image-compressor/archive/refs/tags/v2.6.0.zip -O $RUNNER_WORKSPACE/CIC-source.zip
unzip $RUNNER_WORKSPACE/CIC-source.zip -d $RUNNER_WORKSPACE/CIC-source
# TODO dynamic latest version
- name: Build CIC
run: |
cd $RUNNER_WORKSPACE/CIC-source
cd `ls`
export CIC_SOURCE_PATH="$PWD"
cmake -B build_dir -DCMAKE_PREFIX_PATH=$Qt6_DIR -DCMAKE_BUILD_TYPE=Release
cmake --build build_dir --config Release --target caesium_image_compressor
echo ""
find build_dir
echo ""
ldd "build_dir/Caesium Image Compressor"
echo ""
ldd "build_dir/libcaesium-prefix/src/libcaesium/target/release/libcaesium.so"
# TODO export不会传到下一个步骤(step)
- name: Copy needed built files
run: |
pwd
mkdir -p $RUNNER_WORKSPACE/out
echo $CIC_SOURCE_PATH
cd $RUNNER_WORKSPACE/CIC-source
cd `ls`
cp "build_dir/libcaesium-prefix/src/libcaesium/target/release/libcaesium.so" $RUNNER_WORKSPACE/out/
cp "build_dir/Caesium Image Compressor" $RUNNER_WORKSPACE/out/
cp -ar "resources/icons/icon."* "resources/icons/logo"* $RUNNER_WORKSPACE/out/
find $RUNNER_WORKSPACE/out/
- name: Prepare for AppImage
run: |
cp -ar $RUNNER_WORKSPACE/out/ $RUNNER_WORKSPACE/AppDir
cp -ar $GITHUB_WORKSPACE/AppDir/* $RUNNER_WORKSPACE/AppDir/
cd $RUNNER_WORKSPACE/AppDir
mkdir -p usr/bin usr/lib
mv "Caesium Image Compressor" usr/bin/CaesiumImageCompressor
mv libcaesium.so usr/lib/
- name: Preprare to upload artifact
run: |
cd $GITHUB_WORKSPACE
git checkout binaries
git checkout .
mkdir -p latest-build_ubuntu-lts
rm -rf latest-build_ubuntu-lts/*
cp -ar $RUNNER_WORKSPACE/out $RUNNER_WORKSPACE/AppDir $GITHUB_WORKSPACE/latest-build_ubuntu-lts/
find $GITHUB_WORKSPACE/latest-build_ubuntu-lts/
tar --bzip2 -cvf artifact.tar latest-build_ubuntu-lts
- name: upload artiface
uses: actions/upload-artifact@v3
with:
name: built_on_ubuntu-lts
path: ${{ github.workspace }}/artifact.tar