Skip to content

Commit

Permalink
ci(revert-later): only msvc
Browse files Browse the repository at this point in the history
  • Loading branch information
scarf005 committed Mar 3, 2024
1 parent eaddf2a commit 2a6de1e
Showing 1 changed file with 1 addition and 153 deletions.
154 changes: 1 addition & 153 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,78 +9,7 @@ env:
VCPKG_BINARY_SOURCES: "default"

jobs:
metadata:
runs-on: ubuntu-latest
outputs:
count: ${{ steps.env_vars.outputs.count }}
tag_name: ${{ steps.env_vars.outputs.tag_name }}
release_name: ${{ steps.env_vars.outputs.release_name }}
steps:
- uses: actions/checkout@v3
- id: env_vars
run: |
TAG_NAME=$(date -u --iso-8601 --date='1 day ago')
COMMITS=$(git log --oneline --since="$TAG_NAME" | wc -l)
RELEASE_NAME="Experimental $TAG_NAME"
echo "commits yesterday ($TAG_NAME): $COMMITS" >> "$GITHUB_STEP_SUMMARY"
echo "count=$COMMITS" >> "$GITHUB_OUTPUT"
echo "tag_name=$TAG_NAME" >> "$GITHUB_OUTPUT"
echo "release_name=$RELEASE_NAME" >> "$GITHUB_OUTPUT"
release:
needs: metadata
name: Create Release
runs-on: ubuntu-22.04

# if: fromJson(needs.metadata.outputs.count) > 0
outputs:
upload_url: ${{ steps.create_release.outputs.upload_url }}
release_already_exists: ${{ steps.tag_check.outputs.exists }}

steps:
- name: Check if there is existing git tag
id: tag_check
uses: mukunku/[email protected]
with:
tag: ${{ needs.metadata.outputs.tag_name }}
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

- uses: actions/checkout@v3

- name: Push tag
if: ${{ steps.tag_check.outputs.exists == 'false' }}
id: tag_version
uses: mathieudutour/[email protected]
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
custom_tag: ${{ needs.metadata.outputs.tag_name }}
tag_prefix: ""

- uses: actions/checkout@v3

- run: git fetch origin tag ${{ needs.metadata.outputs.tag_name }} --no-tags

- name: Create release
if: ${{ steps.tag_check.outputs.exists == 'false' }}
id: create_release
uses: actions/create-release@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
tag_name: ${{ needs.metadata.outputs.tag_name }}
release_name: ${{ needs.metadata.outputs.release_name }}
body: |
${{ steps.build_changelog.outputs.changelog }}
These are the outputs for the experimental build of commit [${{ github.sha }}](https://github.com/${{ github.repository }}/commit/${{ github.sha }})
draft: false
prerelease: true

builds:
needs: [metadata, release]
if: ${{ needs.release.outputs.release_already_exists == 'false' }}
strategy:
fail-fast: false
matrix:
Expand Down Expand Up @@ -112,7 +41,7 @@ jobs:
run: |
cat >VERSION.txt <<EOL
build type: ${{ matrix.artifact }}
build number: ${{ needs.metadata.outputs.tag_name }}
build number: WIP
commit sha: ${{ github.sha }}
commit url: https://github.com/${{ github.repository }}/commit/${{ github.sha }}
EOL
Expand Down Expand Up @@ -155,39 +84,12 @@ jobs:
shasum -a 256 -c ./build-scripts/libbacktrace-${{ matrix.mxe }}-w64-mingw32-sha256
sudo tar -xzf libbacktrace-${{ matrix.mxe }}-w64-mingw32.tar.gz --exclude=LICENSE -C /opt/mxe/usr/${{ matrix.mxe }}-w64-mingw32.static.gcc11
- name: Install dependencies (Linux)
if: runner.os == 'Linux' && matrix.mxe == 'none' && matrix.android == 'none'
run: |
sudo apt-get update
sudo apt-get install libncursesw5-dev libsdl2-dev libsdl2-ttf-dev libsdl2-image-dev \
libsdl2-mixer-dev libpulse-dev ccache gettext parallel
- name: Install dependencies (mac)
if: runner.os == 'macOS'
run: |
HOMEBREW_NO_AUTO_UPDATE=yes HOMEBREW_NO_INSTALL_CLEANUP=yes brew install sdl2 sdl2_image sdl2_ttf sdl2_mixer gettext ccache parallel
pip3 install mac_alias==2.2.0 dmgbuild==1.6.1 biplist
- name: Compile translations (windows)
if: runner.os == 'Windows'
shell: bash
run: |
lang/compile_mo.sh all
- name: Build CBN (linux)
if: runner.os == 'Linux' && matrix.mxe == 'none' && matrix.android == 'none'
run: |
make -j$((`nproc`+0)) TILES=${{ matrix.tiles }} SOUND=${{ matrix.tiles }} LUA=1 RELEASE=1 LANGUAGES=all PCH=0 bindist
mv cataclysmbn-unstable.tar.gz cbn-${{ matrix.artifact }}-${{ needs.metadata.outputs.tag_name }}.tar.gz
- name: Build CBN (windows)
if: matrix.mxe != 'none'
env:
PLATFORM: /opt/mxe/usr/bin/${{ matrix.mxe }}-w64-mingw32.static.gcc11-
run: |
make -j$((`nproc`+0)) CROSS="${PLATFORM}" TILES=1 SOUND=1 LUA=1 RELEASE=1 LANGUAGES=all PCH=0 bindist
mv cataclysmbn-unstable.zip cbn-${{ matrix.artifact }}-${{ needs.metadata.outputs.tag_name }}.zip
- name: Build CBN (windows msvc)
if: runner.os == 'Windows'
env:
Expand All @@ -196,57 +98,3 @@ jobs:
msbuild -m -p:Configuration=Release -p:Platform=${{ matrix.arch }} "-target:Cataclysm-vcpkg-static;JsonFormatter-vcpkg-static" msvc-full-features\Cataclysm-vcpkg-static.sln
.\build-scripts\windist.ps1
mv cataclysmbn.zip cbn-${{ matrix.artifact }}-${{ needs.metadata.outputs.tag_name }}.zip
- name: Build CBN (osx)
if: runner.os == 'macOS'
run: |
make -j3 TILES=${{ matrix.tiles }} SOUND=${{ matrix.tiles }} LUA=1 RELEASE=1 LANGUAGES=all USE_HOME_DIR=1 OSX_MIN=11 PCH=0 dmgdist COMPILER=clang++
mv CataclysmBN-unstable.dmg cbn-${{ matrix.artifact }}-${{ needs.metadata.outputs.tag_name }}.dmg
- name: Set up JDK 11 (android)
if: runner.os == 'Linux' && matrix.android != 'none' && matrix.mxe == 'none'
uses: actions/setup-java@v3
with:
java-version: "11"
distribution: "adopt"

- name: Setup Build and Dependencies (android)
if: runner.os == 'Linux' && matrix.android != 'none' && matrix.mxe == 'none'
run: |
sudo apt-get update
sudo apt-get install gettext
- name: Build CBN (android)
if: runner.os == 'Linux' && matrix.android != 'none' && matrix.mxe == 'none'
working-directory: ./android
run: |
echo "${{ secrets.KEYSTORE }}" > release.keystore.asc
gpg -d --passphrase "${{ secrets.KEYSTORE_PASSWORD }}" --batch release.keystore.asc > app/release.keystore
echo "${{ secrets.KEYSTORE_PROPERTIES }}" > keystore.properties.asc
gpg -d --passphrase "${{ secrets.KEYSTORE_PASSWORD }}" --batch keystore.properties.asc > keystore.properties
export UPSTREAM_BUILD_NUMBER="$((2037 + ${{ github.run_number }}))"
chmod +x gradlew
if [ ${{ matrix.android }} = arm64 ]
then
./gradlew -Pj=$((`nproc`+0)) -Pabi_arm_32=false assembleExperimentalRelease
mv ./app/build/outputs/apk/experimental/release/*.apk ../cbn-${{ matrix.artifact }}-${{ needs.metadata.outputs.tag_name }}.apk
elif [ ${{ matrix.android }} = arm32 ]
then
./gradlew -Pj=$((`nproc`+0)) -Pabi_arm_64=false assembleExperimentalRelease
mv ./app/build/outputs/apk/experimental/release/*.apk ../cbn-${{ matrix.artifact }}-${{ needs.metadata.outputs.tag_name }}.apk
elif [ ${{ matrix.android }} = bundle ]
then
./gradlew -Pj=$((`nproc`+0)) bundleExperimentalRelease
mv ./app/build/outputs/bundle/experimentalRelease/*.aab ../cbn-${{ matrix.artifact }}-${{ needs.metadata.outputs.tag_name }}.aab
fi
- name: Upload release asset
id: upload-release-asset
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ needs.release.outputs.upload_url }}
asset_path: cbn-${{ matrix.artifact }}-${{ needs.metadata.outputs.tag_name }}.${{ matrix.ext }}
asset_name: cbn-${{ matrix.artifact }}-${{ needs.metadata.outputs.tag_name }}.${{ matrix.ext }}
asset_content_type: ${{ matrix.content }}

0 comments on commit 2a6de1e

Please sign in to comment.