Configuring uploading artifacts #1
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
# Copyright 2021 Google LLC | |
# | |
# Licensed under the Apache License, Version 2.0 (the "License"); | |
# you may not use this file except in compliance with the License. | |
# You may obtain a copy of the License at | |
# | |
# http://www.apache.org/licenses/LICENSE-2.0 | |
# | |
# Unless required by applicable law or agreed to in writing, software | |
# distributed under the License is distributed on an "AS IS" BASIS, | |
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | |
# See the License for the specific language governing permissions and | |
# limitations under the License. | |
permissions: read-all | |
name: Build / test | |
on: [push, pull_request] | |
concurrency: | |
group: ${{ github.workflow }}-${{ github.ref }} | |
cancel-in-progress: true | |
jobs: | |
cmake_ubuntu_2204: | |
name: Build and test ${{ matrix.name }} | |
runs-on: ubuntu-22.04 | |
strategy: | |
matrix: | |
include: | |
- name: Clang-15 (C++20) | |
extra_deps: clang-15 | |
c_compiler: clang-15 | |
cxx_compiler: clang++-15 | |
cxx_standard: 20 | |
steps: | |
- name: Harden Runner | |
uses: step-security/harden-runner@63c24ba6bd7ba022e95695ff85de572c04a18142 # v2.7.0 | |
with: | |
egress-policy: audit # cannot be block - runner does git checkout | |
- uses: actions/checkout@8ade135a41bc03ea155e62e844d188df1ea18608 # v4.0.0 | |
- name: Install deps | |
run: sudo apt-get install ${{ matrix.extra_deps }} git | |
- name: Build Clang x86_64 | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
run: | | |
export CMAKE_BUILD_PARALLEL_LEVEL=2 | |
export CTEST_PARALLEL_LEVEL=2 | |
git clone --branch widen_mul https://token:${GITHUB_TOKEN}@github.com/awxkee/highway | |
CXXFLAGS=${{ matrix.cxx_flags }} CC=${{ matrix.c_compiler }} CXX=${{ matrix.cxx_compiler }} cmake -DCMAKE_CXX_STANDARD=${{ matrix.cxx_standard }} -DBUILD_SHARED=ON -B out . | |
cmake --build out | |
- name: Compress Clang x86_64 build | |
uses: a7ul/tar-action@v1.1.0 | |
id: compress | |
with: | |
command: c | |
files: | | |
./out/libsparkyuv.so | |
include | |
outPath: libsparkyuv.linux-x86_64.tar.gz | |
- name: Upload built library | |
uses: actions/upload-artifact@v4 | |
with: | |
name: libsparkyuv.linux-x86_64.tar.gz | |
path: libsparkyuv.linux-x86_64.tar.gz |