Improved CI build scripts 2.

This commit is contained in:
Gonzalo Exequiel Pedone 2021-08-03 13:38:16 -03:00
parent 0f9278ff7a
commit d7e35cb235
No known key found for this signature in database
GPG key ID: B8B09E63E9B85BAF
4 changed files with 18 additions and 10 deletions

View file

@ -33,7 +33,7 @@ jobs:
-v ${{ github.workspace }}:/sources -v ${{ github.workspace }}:/sources
-e NSIS_VERSION=${{ env.NSIS_VERSION }} -e NSIS_VERSION=${{ env.NSIS_VERSION }}
-e TARGET_ARCH=${{ matrix.target_arch }} -e TARGET_ARCH=${{ matrix.target_arch }}
-e COMPILER=${{ matrix.COMPILER }} -e COMPILER=${{ matrix.compiler }}
-e DOCKERIMG=${{ env.DOCKERIMG }} -e DOCKERIMG=${{ env.DOCKERIMG }}
-e ARCH_ROOT_URL=${{ env.ARCH_ROOT_URL }} -e ARCH_ROOT_URL=${{ env.ARCH_ROOT_URL }}
-e NJOBS=${{ env.NJOBS }} -e NJOBS=${{ env.NJOBS }}
@ -66,7 +66,7 @@ jobs:
-v ${{ github.workspace }}:/sources -v ${{ github.workspace }}:/sources
-e NSIS_VERSION=${{ env.NSIS_VERSION }} -e NSIS_VERSION=${{ env.NSIS_VERSION }}
-e TARGET_ARCH=${{ matrix.target_arch }} -e TARGET_ARCH=${{ matrix.target_arch }}
-e COMPILER=${{ matrix.COMPILER }} -e COMPILER=${{ matrix.compiler }}
-e DOCKERIMG=${{ env.DOCKERIMG }} -e DOCKERIMG=${{ env.DOCKERIMG }}
-e ARCH_ROOT_URL=${{ env.ARCH_ROOT_URL }} -e ARCH_ROOT_URL=${{ env.ARCH_ROOT_URL }}
-e NJOBS=${{ env.NJOBS }} -e NJOBS=${{ env.NJOBS }}
@ -89,14 +89,14 @@ jobs:
chmod +x ports/ci/linux-mingw/deploy.sh chmod +x ports/ci/linux-mingw/deploy.sh
./ports/ci/linux-mingw/deploy.sh ./ports/ci/linux-mingw/deploy.sh
- name: Release Upload - name: Release Upload
uses: softprops/action-gh-release@v1 uses: softprops/action-gh-release@v0.1.6
if: ${{ startsWith(github.ref, 'refs/tags/') }} if: ${{ startsWith(github.ref, 'refs/tags/') }}
with: with:
files: packages/windows-gcc/* files: packages/windows-gcc/*
env: env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Daily Build Upload - name: Daily Build Upload
uses: softprops/action-gh-release@v1 uses: softprops/action-gh-release@v0.1.6
if: ${{ !startsWith(github.ref, 'refs/tags/') }} if: ${{ !startsWith(github.ref, 'refs/tags/') }}
with: with:
body: "${{ github.event.head_commit.message }} (commit: ${{ github.sha }})" body: "${{ github.event.head_commit.message }} (commit: ${{ github.sha }})"

View file

@ -40,14 +40,14 @@ jobs:
chmod +x ports/ci/mac/deploy.sh chmod +x ports/ci/mac/deploy.sh
./ports/ci/mac/deploy.sh ./ports/ci/mac/deploy.sh
- name: Release Upload - name: Release Upload
uses: softprops/action-gh-release@v1 uses: softprops/action-gh-release@v0.1.6
if: ${{ startsWith(github.ref, 'refs/tags/') }} if: ${{ startsWith(github.ref, 'refs/tags/') }}
with: with:
files: packages/mac/* files: packages/mac/*
env: env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Daily Build Upload - name: Daily Build Upload
uses: softprops/action-gh-release@v1 uses: softprops/action-gh-release@v0.1.6
if: ${{ !startsWith(github.ref, 'refs/tags/') }} if: ${{ !startsWith(github.ref, 'refs/tags/') }}
with: with:
body: "${{ github.event.head_commit.message }} (commit: ${{ github.sha }})" body: "${{ github.event.head_commit.message }} (commit: ${{ github.sha }})"

View file

@ -11,7 +11,6 @@ jobs:
defaults: defaults:
run: run:
shell: msys2 {0} shell: msys2 {0}
steps:
strategy: strategy:
max-parallel: 10 max-parallel: 10
fail-fast: false fail-fast: false
@ -21,6 +20,7 @@ jobs:
- compiler: clang - compiler: clang
env: env:
COMPILER: ${{ matrix.compiler }} COMPILER: ${{ matrix.compiler }}
steps:
- uses: actions/checkout@v2 - uses: actions/checkout@v2
- uses: msys2/setup-msys2@v2 - uses: msys2/setup-msys2@v2
with: with:

View file

@ -18,8 +18,14 @@
# #
# Web-Site: http://webcamoid.github.io/ # Web-Site: http://webcamoid.github.io/
SOURCES_DIR=${PWD} COMPILER_C=clang
INSTALL_PREFIX=${SOURCES_DIR}/package-data COMPILER_CXX=clang++
if [ -z "${DISABLE_CCACHE}" ]; then
EXTRA_PARAMS="-DCMAKE_C_COMPILER_LAUNCHER=ccache -DCMAKE_CXX_COMPILER_LAUNCHER=ccache -DCMAKE_OBJCXX_COMPILER_LAUNCHER=ccache"
fi
INSTALL_PREFIX=${PWD}/package-data
mkdir build mkdir build
cmake \ cmake \
@ -27,6 +33,8 @@ cmake \
-S . \ -S . \
-B build \ -B build \
-DCMAKE_BUILD_TYPE=Release \ -DCMAKE_BUILD_TYPE=Release \
-DCMAKE_INSTALL_PREFIX="${INSTALL_PREFIX}" -DCMAKE_INSTALL_PREFIX="${INSTALL_PREFIX}" \
-DCMAKE_C_COMPILER="${COMPILER_C}" \
-DCMAKE_CXX_COMPILER="${COMPILER_CXX}"
cmake --build build --parallel ${NJOBS} cmake --build build --parallel ${NJOBS}
cmake --build build --target install cmake --build build --target install