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 \
|
ninja-build \
|
||||||
libjack-jackd2-dev
|
libjack-jackd2-dev
|
||||||
- name: Install abseil
|
- name: Install abseil
|
||||||
if: ${{ github.ref_type == 'branch' }}
|
if: github.ref_type == 'branch'
|
||||||
run: |
|
run: |
|
||||||
sudo apt-get install \
|
sudo apt-get install \
|
||||||
libabsl-dev \
|
libabsl-dev \
|
||||||
|
|
@ -160,13 +160,13 @@ jobs:
|
||||||
)
|
)
|
||||||
cmake "${options[@]}"
|
cmake "${options[@]}"
|
||||||
- name: Create tarball
|
- name: Create tarball
|
||||||
if: ${{ github.ref_type == 'tag' }}
|
if: github.ref_type == 'tag' || github.ref_name == 'release-test'
|
||||||
run: |
|
run: |
|
||||||
DESTDIR="$(pwd)/${{ env.install_name }}" \
|
DESTDIR="$(pwd)/${{ env.install_name }}" \
|
||||||
cmake --build build --config ${{ env.build_type }} --target install
|
cmake --build build --config ${{ env.build_type }} --target install
|
||||||
tar czvf "${{ env.install_name }}".tar.gz "${{ env.install_name }}"
|
tar czvf "${{ env.install_name }}".tar.gz "${{ env.install_name }}"
|
||||||
- name: Upload
|
- name: Upload
|
||||||
if: ${{ github.ref_type == 'tag' }}
|
if: github.ref_type == 'tag' || github.ref_name == 'release-test'
|
||||||
uses: actions/upload-artifact@v3
|
uses: actions/upload-artifact@v3
|
||||||
with:
|
with:
|
||||||
name: Linux tarball
|
name: Linux tarball
|
||||||
|
|
@ -184,7 +184,7 @@ jobs:
|
||||||
with:
|
with:
|
||||||
submodules: recursive
|
submodules: recursive
|
||||||
- name: Install dependencies
|
- name: Install dependencies
|
||||||
if: ${{ github.ref_type == 'branch' }}
|
if: github.ref_type == 'branch'
|
||||||
run: brew install abseil
|
run: brew install abseil
|
||||||
- name: Configure CMake
|
- name: Configure CMake
|
||||||
run: |
|
run: |
|
||||||
|
|
@ -233,13 +233,13 @@ jobs:
|
||||||
)
|
)
|
||||||
cmake "${options[@]}"
|
cmake "${options[@]}"
|
||||||
- name: Create tarball
|
- name: Create tarball
|
||||||
if: ${{ github.ref_type == 'tag' }}
|
if: github.ref_type == 'tag' || github.ref_name == 'release-test'
|
||||||
run: |
|
run: |
|
||||||
DESTDIR="$(pwd)/${{ env.install_name }}" \
|
DESTDIR="$(pwd)/${{ env.install_name }}" \
|
||||||
cmake --build build --config ${{ env.build_type }} --target install
|
cmake --build build --config ${{ env.build_type }} --target install
|
||||||
tar czvf "${{ env.install_name }}".tar.gz "${{ env.install_name }}"
|
tar czvf "${{ env.install_name }}".tar.gz "${{ env.install_name }}"
|
||||||
- name: Upload
|
- name: Upload
|
||||||
if: ${{ github.ref_type == 'tag' }}
|
if: github.ref_type == 'tag' || github.ref_name == 'release-test'
|
||||||
uses: actions/upload-artifact@v3
|
uses: actions/upload-artifact@v3
|
||||||
with:
|
with:
|
||||||
name: macOS tarball
|
name: macOS tarball
|
||||||
|
|
@ -299,17 +299,17 @@ jobs:
|
||||||
--parallel 2 `
|
--parallel 2 `
|
||||||
--verbose `
|
--verbose `
|
||||||
- name: Create zip package
|
- 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\*"
|
run: 7z a "${{ env.install_name }}.zip" ".\build\library\*"
|
||||||
- name: Upload
|
- name: Upload
|
||||||
if: ${{ github.ref_type == 'tag' }}
|
if: github.ref_type == 'tag' || github.ref_name == 'release-test'
|
||||||
uses: actions/upload-artifact@v3
|
uses: actions/upload-artifact@v3
|
||||||
with:
|
with:
|
||||||
name: ${{ matrix.pkg_platform }} zip package
|
name: ${{ matrix.pkg_platform }} zip package
|
||||||
path: "${{ github.workspace }}/${{ env.install_name }}.zip"
|
path: "${{ github.workspace }}/${{ env.install_name }}.zip"
|
||||||
|
|
||||||
archive_source_code:
|
archive_source_code:
|
||||||
if: ${{ github.ref_type == 'tag' }}
|
if: github.ref_type == 'tag' || github.ref_name == 'release-test'
|
||||||
name: Source code archive
|
name: Source code archive
|
||||||
runs-on: ubuntu-20.04
|
runs-on: ubuntu-20.04
|
||||||
timeout-minutes: 2
|
timeout-minutes: 2
|
||||||
|
|
@ -415,12 +415,12 @@ jobs:
|
||||||
make -C "${{ github.workspace }}" -f simple.mk
|
make -C "${{ github.workspace }}" -f simple.mk
|
||||||
|
|
||||||
deploy:
|
deploy:
|
||||||
if: ${{ github.ref_type == 'tag' }}
|
if: github.ref_type == 'tag'
|
||||||
runs-on: ubuntu-20.04
|
runs-on: ubuntu-20.04
|
||||||
needs:
|
needs:
|
||||||
- build_for_linux
|
- build_for_linux
|
||||||
- build_for_macos
|
- build_for_macos
|
||||||
# - build_for_mod
|
# build_for_mod
|
||||||
- build_for_windows
|
- build_for_windows
|
||||||
- archive_source_code
|
- archive_source_code
|
||||||
steps:
|
steps:
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue