update workflow #130
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: C/C++ CI | |
on: | |
push: | |
branches: [ "main" ] | |
pull_request: | |
branches: [ "main" ] | |
jobs: | |
build: | |
name: Build | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v4 | |
- name: Install dependencies | |
run: | | |
sudo apt-get update | |
sudo apt-get install -y wget | |
wget https://apt.llvm.org/llvm-snapshot.gpg.key -O - | sudo apt-key add - | |
echo "deb http://apt.llvm.org/focal/ llvm-toolchain-focal-19 main" | sudo tee /etc/apt/sources.list.d/llvm-toolchain-focal-19.list | |
wget http://es.archive.ubuntu.com/ubuntu/pool/main/libf/libffi/libffi7_3.3-4_amd64.deb | |
sudo dpkg -i libffi7_3.3-4_amd64.deb | |
sudo apt-get update | |
sudo apt-get install -y libllvm19 llvm-19 clang-19 build-essential cmake | |
- name: Build | |
run: | | |
mkdir build | |
cd build | |
cmake .. -DLLVM_INCLUDE_DIRS=/usr/include/llvm-19 -DLLVMC_INCLUDE_DIRS=/usr/include/llvm-c-19 | |
make -j4 | |
mv dcc ../dcc-x86_64 | |
- name: Upload artifact | |
uses: actions/upload-artifact@v3 | |
with: | |
name: dcc-artifact-x86_64 | |
path: dcc-x86_64 | |
publish: | |
name: Publish | |
runs-on: ubuntu-latest | |
needs: [ build ] | |
steps: | |
- name: Authenticate GitHub CLI | |
run: echo "${{ secrets.GITHUB_TOKEN }}" | gh auth login --with-token | |
- name: Download artifact | |
uses: actions/download-artifact@v3 | |
with: | |
name: dcc-artifact-x86_64 | |
- name: Update Nightly Release | |
uses: andelf/nightly-release@main | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
with: | |
tag_name: nightly-release | |
name: 'Nightly Release' | |
body: | | |
Automated nightly release for commit ${{ github.sha }}. This release contains all of the newest features. Not intended for use unless you're a developer | |
files: | | |
./dcc-x86_64 |