CI: simplified if conditional expressions, added release-test branch
release-test branch is intended to be used on a user repository, not upstream, to test builds before tagging.
This commit is contained in:
parent
9392c2d9b2
commit
53917ec8f2
1 changed files with 11 additions and 11 deletions
22
.github/workflows/build.yml
vendored
22
.github/workflows/build.yml
vendored
|
|
@ -105,7 +105,7 @@ jobs:
|
|||
ninja-build \
|
||||
libjack-jackd2-dev
|
||||
- name: Install abseil
|
||||
if: ${{ github.ref_type == 'branch' }}
|
||||
if: github.ref_type == 'branch'
|
||||
run: |
|
||||
sudo apt-get install \
|
||||
libabsl-dev \
|
||||
|
|
@ -160,13 +160,13 @@ jobs:
|
|||
)
|
||||
cmake "${options[@]}"
|
||||
- name: Create tarball
|
||||
if: ${{ github.ref_type == 'tag' }}
|
||||
if: github.ref_type == 'tag' || github.ref_name == 'release-test'
|
||||
run: |
|
||||
DESTDIR="$(pwd)/${{ env.install_name }}" \
|
||||
cmake --build build --config ${{ env.build_type }} --target install
|
||||
tar czvf "${{ env.install_name }}".tar.gz "${{ env.install_name }}"
|
||||
- name: Upload
|
||||
if: ${{ github.ref_type == 'tag' }}
|
||||
if: github.ref_type == 'tag' || github.ref_name == 'release-test'
|
||||
uses: actions/upload-artifact@v3
|
||||
with:
|
||||
name: Linux tarball
|
||||
|
|
@ -184,7 +184,7 @@ jobs:
|
|||
with:
|
||||
submodules: recursive
|
||||
- name: Install dependencies
|
||||
if: ${{ github.ref_type == 'branch' }}
|
||||
if: github.ref_type == 'branch'
|
||||
run: brew install abseil
|
||||
- name: Configure CMake
|
||||
run: |
|
||||
|
|
@ -233,13 +233,13 @@ jobs:
|
|||
)
|
||||
cmake "${options[@]}"
|
||||
- name: Create tarball
|
||||
if: ${{ github.ref_type == 'tag' }}
|
||||
if: github.ref_type == 'tag' || github.ref_name == 'release-test'
|
||||
run: |
|
||||
DESTDIR="$(pwd)/${{ env.install_name }}" \
|
||||
cmake --build build --config ${{ env.build_type }} --target install
|
||||
tar czvf "${{ env.install_name }}".tar.gz "${{ env.install_name }}"
|
||||
- name: Upload
|
||||
if: ${{ github.ref_type == 'tag' }}
|
||||
if: github.ref_type == 'tag' || github.ref_name == 'release-test'
|
||||
uses: actions/upload-artifact@v3
|
||||
with:
|
||||
name: macOS tarball
|
||||
|
|
@ -299,17 +299,17 @@ jobs:
|
|||
--parallel 2 `
|
||||
--verbose `
|
||||
- name: Create zip package
|
||||
if: ${{ github.ref_type == 'tag' }}
|
||||
if: github.ref_type == 'tag' || github.ref_name == 'release-test'
|
||||
run: 7z a "${{ env.install_name }}.zip" ".\build\library\*"
|
||||
- name: Upload
|
||||
if: ${{ github.ref_type == 'tag' }}
|
||||
if: github.ref_type == 'tag' || github.ref_name == 'release-test'
|
||||
uses: actions/upload-artifact@v3
|
||||
with:
|
||||
name: ${{ matrix.pkg_platform }} zip package
|
||||
path: "${{ github.workspace }}/${{ env.install_name }}.zip"
|
||||
|
||||
archive_source_code:
|
||||
if: ${{ github.ref_type == 'tag' }}
|
||||
if: github.ref_type == 'tag' || github.ref_name == 'release-test'
|
||||
name: Source code archive
|
||||
runs-on: ubuntu-20.04
|
||||
timeout-minutes: 2
|
||||
|
|
@ -415,12 +415,12 @@ jobs:
|
|||
make -C "${{ github.workspace }}" -f simple.mk
|
||||
|
||||
deploy:
|
||||
if: ${{ github.ref_type == 'tag' }}
|
||||
if: github.ref_type == 'tag'
|
||||
runs-on: ubuntu-20.04
|
||||
needs:
|
||||
- build_for_linux
|
||||
- build_for_macos
|
||||
# - build_for_mod
|
||||
# build_for_mod
|
||||
- build_for_windows
|
||||
- archive_source_code
|
||||
steps:
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue