17 #21
This file contains 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: Build | |
on: | |
push: | |
branches: | |
- master | |
concurrency: | |
group: ${{ github.workflow }}-${{ github.ref }} | |
cancel-in-progress: true | |
jobs: | |
build-and-upload: | |
name: Build and Upload | |
strategy: | |
matrix: | |
os: [linux, macos] | |
runs-on: ${{ fromJSON('{"linux":"ubuntu-latest","macos":"macos-14"}')[matrix.os] }} | |
steps: | |
- name: update llvm | |
if: matrix.os == 'macos' | |
run: | | |
brew install llvm@17 | |
brew link --overwrite llvm@17 | |
echo "CC=$(brew --prefix llvm@17)/bin/clang" >> $GITHUB_ENV | |
echo "CXX=$(brew --prefix llvm@17)/bin/clang++" >> $GITHUB_ENV | |
echo "LDFLAGS=-L$(brew --prefix llvm@17)/lib" >> $GITHUB_ENV | |
echo "CPPFLAGS=-I$(brew --prefix llvm@17)/include" >> $GITHUB_ENV | |
echo "PATH=$(brew --prefix llvm@17)/bin:$PATH" >> $GITHUB_ENV | |
echo "LD_LIBRARY_PATH=$(brew --prefix llvm@17)/lib:$LD_LIBRARY_PATH" >> $GITHUB_ENV | |
echo "PKG_CONFIG_PATH=$(brew --prefix llvm@17)/lib/pkgconfig:$PKG_CONFIG_PATH" >> $GITHUB_ENV | |
echo "CMAKE_PREFIX_PATH=$(brew --prefix llvm@17):$CMAKE_PREFIX_PATH" >> $GITHUB_ENV | |
echo "LLVM_CONFIG_PATH=$(brew --prefix llvm@17)/bin/llvm-config" >> $GITHUB_ENV | |
echo "LLVM_BIN_PATH=$(brew --prefix llvm@17)/bin" >> $GITHUB_ENV | |
- name: Checkout Code | |
uses: actions/checkout@v4 | |
with: | |
submodules: recursive | |
# - name: Setup tmate session | |
# uses: mxschmitt/action-tmate@v3 | |
- name: Build msquic | |
run: ./scripts/msquic.sh | |
- name: Compress build output | |
run: | | |
ls -lhR build | |
tar czf ${{ matrix.os }}-build.tar.gz build/ | |
- name: Upload Artifact | |
uses: actions/upload-artifact@v4 | |
with: | |
name: ${{ matrix.os }}-build | |
path: ${{ matrix.os }}-build.tar.gz | |
retention-days: 1 |