Support packaging for project release (#96)
Co-authored-by: ykiko <ykikoykikoykiko@gmail.com>
This commit is contained in:
73
.github/workflows/nightly.yml
vendored
Normal file
73
.github/workflows/nightly.yml
vendored
Normal file
@@ -0,0 +1,73 @@
|
||||
name: nightly
|
||||
|
||||
permissions:
|
||||
contents: write
|
||||
|
||||
on:
|
||||
push:
|
||||
branches: [ non-existent-branch ]
|
||||
|
||||
jobs:
|
||||
package:
|
||||
strategy:
|
||||
matrix:
|
||||
include:
|
||||
- os: windows-2022
|
||||
artifact_name: clice.7z
|
||||
asset_name: clice-x64-windows-msvc.7z
|
||||
toolchain: clang
|
||||
|
||||
- os: ubuntu-24.04
|
||||
artifact_name: clice.tar.xz
|
||||
asset_name: clice-x86_64-linux-gnu.tar.xz
|
||||
toolchain: clang-20
|
||||
|
||||
runs-on: ${{ matrix.os }}
|
||||
|
||||
steps:
|
||||
- name: Setup llvm
|
||||
if: matrix.os == 'windows-2022'
|
||||
uses: MinoruSekine/setup-scoop@v4.0.1
|
||||
with:
|
||||
buckets: main
|
||||
apps: llvm
|
||||
|
||||
- name: Setup llvm & libstdc++ & cmake & ninja
|
||||
if: matrix.os == 'ubuntu-24.04'
|
||||
run: |
|
||||
sudo apt remove llvm-16-linker-tools llvm-16 llvm-17-linker-tools llvm-17 llvm-18-linker-tools llvm-18
|
||||
sudo apt update
|
||||
sudo apt install -y gcc-14 g++-14 libstdc++-14-dev cmake ninja-build
|
||||
|
||||
sudo update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-14 100
|
||||
sudo update-alternatives --install /usr/bin/g++ g++ /usr/bin/g++-14 100
|
||||
sudo update-alternatives --set gcc /usr/bin/gcc-14
|
||||
sudo update-alternatives --set g++ /usr/bin/g++-14
|
||||
|
||||
wget https://apt.llvm.org/llvm.sh
|
||||
chmod +x llvm.sh
|
||||
sudo ./llvm.sh 20 all
|
||||
|
||||
- name: Checkout repository
|
||||
uses: actions/checkout@v4
|
||||
|
||||
- name: Setup xmake
|
||||
uses: xmake-io/github-action-setup-xmake@v1
|
||||
with:
|
||||
xmake-version: branch@master
|
||||
actions-cache-folder: '.xmake-cache'
|
||||
actions-cache-key: ${{ matrix.os }}
|
||||
|
||||
- name: Package
|
||||
run: |
|
||||
xmake config --yes --toolchain=${{ matrix.toolchain }} --enable_test=n --dev=n --release=y
|
||||
xmake pack
|
||||
|
||||
- name: Upload binaries to release
|
||||
uses: svenstaro/upload-release-action@v2
|
||||
with:
|
||||
repo_token: ${{ secrets.GITHUB_TOKEN }}
|
||||
file: build/xpack/clice/${{ matrix.artifact_name }}
|
||||
asset_name: ${{ matrix.asset_name }}
|
||||
tag: nightly
|
||||
overwrite: true
|
||||
Reference in New Issue
Block a user