16 #22
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@16 | |
brew link --overwrite llvm@16 | |
echo "CC=$(brew --prefix llvm@16)/bin/clang" >> $GITHUB_ENV | |
echo "CXX=$(brew --prefix llvm@16)/bin/clang++" >> $GITHUB_ENV | |
echo "LDFLAGS=-L$(brew --prefix llvm@16)/lib" >> $GITHUB_ENV | |
echo "CPPFLAGS=-I$(brew --prefix llvm@16)/include" >> $GITHUB_ENV | |
echo "PATH=$(brew --prefix llvm@16)/bin:$PATH" >> $GITHUB_ENV | |
echo "LD_LIBRARY_PATH=$(brew --prefix llvm@16)/lib:$LD_LIBRARY_PATH" >> $GITHUB_ENV | |
echo "PKG_CONFIG_PATH=$(brew --prefix llvm@16)/lib/pkgconfig:$PKG_CONFIG_PATH" >> $GITHUB_ENV | |
echo "CMAKE_PREFIX_PATH=$(brew --prefix llvm@16):$CMAKE_PREFIX_PATH" >> $GITHUB_ENV | |
echo "LLVM_CONFIG_PATH=$(brew --prefix llvm@16)/bin/llvm-config" >> $GITHUB_ENV | |
echo "LLVM_BIN_PATH=$(brew --prefix llvm@16)/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 |