Skip to content

21.1.4

21.1.4 #68

Workflow file for this run

name: linux
on:
pull_request:
branches: [ main ]
jobs:
build:
runs-on: ubuntu-22.04
strategy:
matrix:
include:
- build_type: debug
lto: "n"
- build_type: releasedbg
lto: "n"
- build_type: releasedbg
lto: "y"
concurrency:
group: ${{ github.ref }}-${{ github.base_ref }}-${{ github.head_ref }}-linux-${{ matrix.build_type }}-${{ matrix.lto }}
cancel-in-progress: true
steps:
- name: Free Disk Space
uses: jlumbroso/free-disk-space@main
- name: Setup llvm
run: |
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: '2.9.9'
actions-cache-folder: '.xmake-cache'
- name: Increase Swap Space
run: |
echo "===== Initial Status ====="
sudo swapon --show
free -h
echo "===== Creating Swap File ====="
sudo swapoff -a
sudo fallocate -l 32G /swapfile
sudo chmod 600 /swapfile
sudo mkswap /swapfile
sudo swapon /swapfile
echo "===== Final Status ====="
sudo swapon --show
free -h
df -h
- name: Package
run: |
xmake config --yes --verbose --toolchain=clang-20 --mode=${{ matrix.build_type }} --policies=build.optimization.lto:${{ matrix.lto }}
- name: Upload artifacts
uses: actions/upload-artifact@v4
with:
name: linux-${{ matrix.build_type }}-lto_${{ matrix.lto }}.tar.xz
path: build/package/*
compression-level: 0
if-no-files-found: error