Skip to content

Commit

Permalink
CI: simplified if conditional expressions, added release-test branch
Browse files Browse the repository at this point in the history
release-test branch is intended to be used on a user repository, not upstream, to test builds before tagging.
  • Loading branch information
redtide committed Feb 20, 2024
1 parent 9392c2d commit 53917ec
Showing 1 changed file with 11 additions and 11 deletions.
22 changes: 11 additions & 11 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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 \
Expand Down Expand Up @@ -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
Expand All @@ -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: |
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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:
Expand Down

0 comments on commit 53917ec

Please sign in to comment.