Updates to github actions (#6358)
This commit is contained in:
parent
9c81dc0dd8
commit
8b93db0841
8 changed files with 70 additions and 200 deletions
|
@ -10,13 +10,13 @@ cp -r dist/scripting "$REV_NAME"
|
||||||
tar $COMPRESSION_FLAGS "$ARCHIVE_NAME" "$REV_NAME"
|
tar $COMPRESSION_FLAGS "$ARCHIVE_NAME" "$REV_NAME"
|
||||||
|
|
||||||
# Find out what release we are building
|
# Find out what release we are building
|
||||||
if [ -z $GIT_TAG_NAME ]; then
|
if [[ "$GITHUB_REF_NAME" =~ ^canary- ]] || [[ "$GITHUB_REF_NAME" =~ ^nightly- ]]; then
|
||||||
RELEASE_NAME=head
|
RELEASE_NAME=$(echo $GITHUB_REF_NAME | cut -d- -f1)
|
||||||
else
|
|
||||||
RELEASE_NAME=$(echo $GIT_TAG_NAME | cut -d- -f1)
|
|
||||||
if [ "$NAME" = "linux-mingw" ]; then
|
if [ "$NAME" = "linux-mingw" ]; then
|
||||||
RELEASE_NAME="${RELEASE_NAME}-mingw"
|
RELEASE_NAME="${RELEASE_NAME}-mingw"
|
||||||
fi
|
fi
|
||||||
|
else
|
||||||
|
RELEASE_NAME=head
|
||||||
fi
|
fi
|
||||||
|
|
||||||
mv "$REV_NAME" $RELEASE_NAME
|
mv "$REV_NAME" $RELEASE_NAME
|
||||||
|
|
|
@ -3,8 +3,8 @@ $GITDATE = $(git show -s --date=short --format='%ad') -replace "-", ""
|
||||||
$GITREV = $(git show -s --format='%h')
|
$GITREV = $(git show -s --format='%h')
|
||||||
|
|
||||||
# Find out what release we are building
|
# Find out what release we are building
|
||||||
if ( $GIT_TAG_NAME ) {
|
if ( $env:GITHUB_REF_NAME -like "*canary-*" -or $env:GITHUB_REF_NAME -like "*nightly-*" ) {
|
||||||
$RELEASE_NAME = ${GIT_TAG_NAME}.split("-")[0]
|
$RELEASE_NAME = ${env:GITHUB_REF_NAME}.split("-")[0]
|
||||||
$RELEASE_NAME = "${RELEASE_NAME}-msvc"
|
$RELEASE_NAME = "${RELEASE_NAME}-msvc"
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
|
|
30
.github/workflows/ci.yml
vendored
30
.github/workflows/ci.yml
vendored
|
@ -40,9 +40,6 @@ jobs:
|
||||||
key: ${{ runner.os }}-${{ matrix.image }}-${{ github.sha }}
|
key: ${{ runner.os }}-${{ matrix.image }}-${{ github.sha }}
|
||||||
restore-keys: |
|
restore-keys: |
|
||||||
${{ runner.os }}-${{ matrix.image }}-
|
${{ runner.os }}-${{ matrix.image }}-
|
||||||
- name: Query tag name
|
|
||||||
uses: little-core-labs/get-git-tag@v3.0.2
|
|
||||||
id: tagName
|
|
||||||
- name: Build
|
- name: Build
|
||||||
run: ./.ci/${{ matrix.image }}/docker.sh
|
run: ./.ci/${{ matrix.image }}/docker.sh
|
||||||
env:
|
env:
|
||||||
|
@ -88,9 +85,6 @@ jobs:
|
||||||
key: ${{ runner.os }}-macos-${{ matrix.arch }}-${{ github.sha }}
|
key: ${{ runner.os }}-macos-${{ matrix.arch }}-${{ github.sha }}
|
||||||
restore-keys: |
|
restore-keys: |
|
||||||
${{ runner.os }}-macos-${{ matrix.arch }}-
|
${{ runner.os }}-macos-${{ matrix.arch }}-
|
||||||
- name: Query tag name
|
|
||||||
uses: little-core-labs/get-git-tag@v3.0.2
|
|
||||||
id: tagName
|
|
||||||
- name: Install dependencies
|
- name: Install dependencies
|
||||||
run: ./.ci/macos/deps.sh
|
run: ./.ci/macos/deps.sh
|
||||||
- name: Build
|
- name: Build
|
||||||
|
@ -113,9 +107,6 @@ jobs:
|
||||||
- uses: actions/checkout@v3
|
- uses: actions/checkout@v3
|
||||||
with:
|
with:
|
||||||
submodules: recursive
|
submodules: recursive
|
||||||
- name: Query tag name
|
|
||||||
uses: little-core-labs/get-git-tag@v3.0.2
|
|
||||||
id: tagName
|
|
||||||
- name: Download x86 build
|
- name: Download x86 build
|
||||||
uses: actions/download-artifact@master
|
uses: actions/download-artifact@master
|
||||||
with:
|
with:
|
||||||
|
@ -154,9 +145,6 @@ jobs:
|
||||||
key: ${{ runner.os }}-win-${{ github.sha }}
|
key: ${{ runner.os }}-win-${{ github.sha }}
|
||||||
restore-keys: |
|
restore-keys: |
|
||||||
${{ runner.os }}-win-
|
${{ runner.os }}-win-
|
||||||
- name: Query tag name
|
|
||||||
uses: little-core-labs/get-git-tag@v3.0.2
|
|
||||||
id: tagName
|
|
||||||
- name: Install dependencies
|
- name: Install dependencies
|
||||||
run: ./.ci/windows-msvc/deps.sh
|
run: ./.ci/windows-msvc/deps.sh
|
||||||
shell: bash
|
shell: bash
|
||||||
|
@ -190,9 +178,12 @@ jobs:
|
||||||
key: ${{ runner.os }}-android-${{ github.sha }}
|
key: ${{ runner.os }}-android-${{ github.sha }}
|
||||||
restore-keys: |
|
restore-keys: |
|
||||||
${{ runner.os }}-android-
|
${{ runner.os }}-android-
|
||||||
- name: Query tag name
|
- name: Set tag name
|
||||||
uses: little-core-labs/get-git-tag@v3.0.2
|
run: |
|
||||||
id: tagName
|
if [[ "$GITHUB_REF_NAME" =~ ^canary- ]] || [[ "$GITHUB_REF_NAME" =~ ^nightly- ]]; then
|
||||||
|
echo "GIT_TAG_NAME=$GITHUB_REF_NAME" >> $GITHUB_ENV
|
||||||
|
fi
|
||||||
|
echo $GIT_TAG_NAME
|
||||||
- name: Deps
|
- name: Deps
|
||||||
run: |
|
run: |
|
||||||
sudo apt-get update
|
sudo apt-get update
|
||||||
|
@ -229,20 +220,17 @@ jobs:
|
||||||
if: ${{ startsWith(github.ref, 'refs/tags/') }}
|
if: ${{ startsWith(github.ref, 'refs/tags/') }}
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/download-artifact@v3
|
- uses: actions/download-artifact@v3
|
||||||
- name: Query tag name
|
|
||||||
uses: little-core-labs/get-git-tag@v3.0.2
|
|
||||||
id: tagName
|
|
||||||
- name: Create release
|
- name: Create release
|
||||||
uses: actions/create-release@v1
|
uses: actions/create-release@v1
|
||||||
env:
|
env:
|
||||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||||
with:
|
with:
|
||||||
tag_name: ${{ steps.tagName.outputs.tag }}
|
tag_name: ${{ github.ref_name }}
|
||||||
release_name: ${{ steps.tagName.outputs.tag }}
|
release_name: ${{ github.ref_name }}
|
||||||
draft: false
|
draft: false
|
||||||
prerelease: false
|
prerelease: false
|
||||||
- name: Upload artifacts
|
- name: Upload artifacts
|
||||||
uses: alexellis/upload-assets@0.2.3
|
uses: alexellis/upload-assets@0.4.0
|
||||||
env:
|
env:
|
||||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||||
with:
|
with:
|
||||||
|
|
8
.github/workflows/publish.yml
vendored
8
.github/workflows/publish.yml
vendored
|
@ -24,7 +24,7 @@ jobs:
|
||||||
name: Pre-checkout
|
name: Pre-checkout
|
||||||
with:
|
with:
|
||||||
submodules: false
|
submodules: false
|
||||||
- uses: actions/github-script@v5
|
- uses: actions/github-script@v6
|
||||||
id: check-changes
|
id: check-changes
|
||||||
name: 'Check for new changes'
|
name: 'Check for new changes'
|
||||||
env:
|
env:
|
||||||
|
@ -46,7 +46,7 @@ jobs:
|
||||||
fetch-depth: 0
|
fetch-depth: 0
|
||||||
submodules: true
|
submodules: true
|
||||||
token: ${{ secrets.ALT_GITHUB_TOKEN }}
|
token: ${{ secrets.ALT_GITHUB_TOKEN }}
|
||||||
- uses: actions/github-script@v5
|
- uses: actions/github-script@v6
|
||||||
name: 'Update and tag new commits'
|
name: 'Update and tag new commits'
|
||||||
if: ${{ steps.check-changes.outputs.result == 'true' }}
|
if: ${{ steps.check-changes.outputs.result == 'true' }}
|
||||||
env:
|
env:
|
||||||
|
@ -66,7 +66,7 @@ jobs:
|
||||||
name: Pre-checkout
|
name: Pre-checkout
|
||||||
with:
|
with:
|
||||||
submodules: false
|
submodules: false
|
||||||
- uses: actions/github-script@v5
|
- uses: actions/github-script@v6
|
||||||
id: check-changes
|
id: check-changes
|
||||||
name: 'Check for new changes'
|
name: 'Check for new changes'
|
||||||
env:
|
env:
|
||||||
|
@ -87,7 +87,7 @@ jobs:
|
||||||
fetch-depth: 0
|
fetch-depth: 0
|
||||||
submodules: true
|
submodules: true
|
||||||
token: ${{ secrets.ALT_GITHUB_TOKEN }}
|
token: ${{ secrets.ALT_GITHUB_TOKEN }}
|
||||||
- uses: actions/github-script@v5
|
- uses: actions/github-script@v6
|
||||||
name: 'Check and merge canary changes'
|
name: 'Check and merge canary changes'
|
||||||
if: ${{ steps.check-changes.outputs.result == 'true' }}
|
if: ${{ steps.check-changes.outputs.result == 'true' }}
|
||||||
env:
|
env:
|
||||||
|
|
|
@ -23,13 +23,7 @@ set(BUILD_VERSION "0")
|
||||||
if (DEFINED ENV{CI})
|
if (DEFINED ENV{CI})
|
||||||
if (DEFINED ENV{GITHUB_ACTIONS})
|
if (DEFINED ENV{GITHUB_ACTIONS})
|
||||||
set(BUILD_REPOSITORY $ENV{GITHUB_REPOSITORY})
|
set(BUILD_REPOSITORY $ENV{GITHUB_REPOSITORY})
|
||||||
set(BUILD_TAG $ENV{GIT_TAG_NAME})
|
set(BUILD_TAG $ENV{GITHUB_REF_NAME})
|
||||||
elseif(DEFINED ENV{APPVEYOR})
|
|
||||||
set(BUILD_REPOSITORY $ENV{APPVEYOR_REPO_NAME})
|
|
||||||
set(BUILD_TAG $ENV{APPVEYOR_REPO_TAG_NAME})
|
|
||||||
elseif(DEFINED ENV{BITRISE_IO})
|
|
||||||
set(BUILD_REPOSITORY "$ENV{BITRISEIO_GIT_REPOSITORY_OWNER}/$ENV{BITRISEIO_GIT_REPOSITORY_SLUG}")
|
|
||||||
set(BUILD_TAG $ENV{BITRISE_GIT_TAG})
|
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
# regex capture the string nightly or canary into CMAKE_MATCH_1
|
# regex capture the string nightly or canary into CMAKE_MATCH_1
|
||||||
|
@ -43,7 +37,6 @@ if (DEFINED ENV{CI})
|
||||||
string(TOUPPER ${FIRST_LETTER} FIRST_LETTER)
|
string(TOUPPER ${FIRST_LETTER} FIRST_LETTER)
|
||||||
set(REPO_NAME "${REPO_NAME}${FIRST_LETTER}${REMAINDER}")
|
set(REPO_NAME "${REPO_NAME}${FIRST_LETTER}${REMAINDER}")
|
||||||
endforeach()
|
endforeach()
|
||||||
if (BUILD_TAG)
|
|
||||||
string(REGEX MATCH "${CMAKE_MATCH_1}-([0-9]+)" OUTVAR ${BUILD_TAG})
|
string(REGEX MATCH "${CMAKE_MATCH_1}-([0-9]+)" OUTVAR ${BUILD_TAG})
|
||||||
if (${CMAKE_MATCH_COUNT} GREATER 0)
|
if (${CMAKE_MATCH_COUNT} GREATER 0)
|
||||||
set(BUILD_VERSION ${CMAKE_MATCH_1})
|
set(BUILD_VERSION ${CMAKE_MATCH_1})
|
||||||
|
@ -57,7 +50,6 @@ if (DEFINED ENV{CI})
|
||||||
endif()
|
endif()
|
||||||
endif()
|
endif()
|
||||||
endif()
|
endif()
|
||||||
endif()
|
|
||||||
|
|
||||||
# The variable SRC_DIR must be passed into the script (since it uses the current build directory for all values of CMAKE_*_DIR)
|
# The variable SRC_DIR must be passed into the script (since it uses the current build directory for all values of CMAKE_*_DIR)
|
||||||
set(VIDEO_CORE "${SRC_DIR}/src/video_core")
|
set(VIDEO_CORE "${SRC_DIR}/src/video_core")
|
||||||
|
|
99
bitrise.yml
99
bitrise.yml
|
@ -1,99 +0,0 @@
|
||||||
---
|
|
||||||
format_version: '11'
|
|
||||||
default_step_lib_source: https://github.com/bitrise-io/bitrise-steplib.git
|
|
||||||
project_type: android
|
|
||||||
trigger_map:
|
|
||||||
- push_branch: "*"
|
|
||||||
workflow: primary
|
|
||||||
- pull_request_source_branch: "*"
|
|
||||||
workflow: primary
|
|
||||||
- tag: "*"
|
|
||||||
workflow: deploy
|
|
||||||
workflows:
|
|
||||||
deploy:
|
|
||||||
steps:
|
|
||||||
- activate-ssh-key@4: {}
|
|
||||||
- git-clone@6: {}
|
|
||||||
- cache-pull@2: {}
|
|
||||||
- script@1:
|
|
||||||
title: Install newer cmake
|
|
||||||
inputs:
|
|
||||||
- content: |-
|
|
||||||
#!/bin/bash
|
|
||||||
set -ex
|
|
||||||
sdkmanager --install "cmake;3.18.1"
|
|
||||||
- install-missing-android-tools@2.3:
|
|
||||||
inputs:
|
|
||||||
- gradlew_path: "$PROJECT_LOCATION/gradlew"
|
|
||||||
- android-lint@0:
|
|
||||||
inputs:
|
|
||||||
- project_location: "$PROJECT_LOCATION"
|
|
||||||
- module: "$MODULE"
|
|
||||||
- variant: "$BUILD_VARIANT"
|
|
||||||
- android-build@0:
|
|
||||||
inputs:
|
|
||||||
- variant: "$BUILD_VARIANT"
|
|
||||||
- project_location: "$PROJECT_LOCATION"
|
|
||||||
- build_type: aab
|
|
||||||
- sign-apk@1:
|
|
||||||
run_if: '{{getenv "BITRISEIO_ANDROID_KEYSTORE_URL" | ne ""}}'
|
|
||||||
- bitrise-step-export-universal-apk@0:
|
|
||||||
run_if: '{{getenv "BITRISEIO_ANDROID_KEYSTORE_URL" | ne ""}}'
|
|
||||||
- generate-changelog@0: {}
|
|
||||||
- github-release@0:
|
|
||||||
run_if: '{{getenv "GITHUB_API_TOKEN" | ne ""}}'
|
|
||||||
inputs:
|
|
||||||
- api_token: "$GITHUB_API_TOKEN"
|
|
||||||
- name: "$BITRISE_GIT_TAG"
|
|
||||||
- body: "$BITRISE_CHANGELOG"
|
|
||||||
- files_to_upload: |-
|
|
||||||
$BITRISE_AAB_PATH|citra-$BITRISE_GIT_TAG.aab
|
|
||||||
$BITRISE_APK_PATH|citra-$BITRISE_GIT_TAG.apk
|
|
||||||
- username: "$BITRISEIO_GIT_REPOSITORY_OWNER"
|
|
||||||
- deploy-to-bitrise-io@1.3:
|
|
||||||
run_if: '{{getenv "BITRISEIO_ANDROID_KEYSTORE_URL" | ne ""}}'
|
|
||||||
- cache-push@2: {}
|
|
||||||
- deploy-to-bitrise-io@2: {}
|
|
||||||
primary:
|
|
||||||
steps:
|
|
||||||
- activate-ssh-key@4: {}
|
|
||||||
- git-clone@6: {}
|
|
||||||
- cache-pull@2: {}
|
|
||||||
- script@1:
|
|
||||||
title: Deps
|
|
||||||
inputs:
|
|
||||||
- content: |-
|
|
||||||
#!/bin/bash
|
|
||||||
set -ex
|
|
||||||
sdkmanager --install "cmake;3.18.1"
|
|
||||||
- install-missing-android-tools@3:
|
|
||||||
inputs:
|
|
||||||
- gradlew_path: "$PROJECT_LOCATION/gradlew"
|
|
||||||
- android-lint@0:
|
|
||||||
inputs:
|
|
||||||
- project_location: "$PROJECT_LOCATION"
|
|
||||||
- module: "$MODULE"
|
|
||||||
- variant: "$BUILD_VARIANT"
|
|
||||||
- android-build@1:
|
|
||||||
inputs:
|
|
||||||
- variant: "$BUILD_VARIANT"
|
|
||||||
- project_location: "$PROJECT_LOCATION"
|
|
||||||
- build_type: apk
|
|
||||||
- cache-push@2: {}
|
|
||||||
- deploy-to-bitrise-io@2: {}
|
|
||||||
meta:
|
|
||||||
bitrise.io:
|
|
||||||
stack: linux-docker-android-20.04
|
|
||||||
app:
|
|
||||||
envs:
|
|
||||||
- opts:
|
|
||||||
is_expand: false
|
|
||||||
PROJECT_LOCATION: src/android
|
|
||||||
- opts:
|
|
||||||
is_expand: false
|
|
||||||
MODULE: app
|
|
||||||
- opts:
|
|
||||||
is_expand: false
|
|
||||||
BUILD_VARIANT: Release
|
|
||||||
- opts:
|
|
||||||
is_expand: false
|
|
|
@ -37,9 +37,9 @@
|
||||||
<key>NSHighResolutionCapable</key>
|
<key>NSHighResolutionCapable</key>
|
||||||
<string>True</string>
|
<string>True</string>
|
||||||
<key>NSCameraUsageDescription</key>
|
<key>NSCameraUsageDescription</key>
|
||||||
<string>This app requires camera access to emulate the 3DS's cameras.</string>
|
<string>This app requires camera access to emulate the 3DS's cameras.</string>
|
||||||
<key>NSMicrophoneUsageDescription</key>
|
<key>NSMicrophoneUsageDescription</key>
|
||||||
<string>This app requires microphone access to emulate the 3DS's microphone.</string>
|
<string>This app requires microphone access to emulate the 3DS's microphone.</string>
|
||||||
<key>LSApplicationCategoryType</key>
|
<key>LSApplicationCategoryType</key>
|
||||||
<string>public.app-category.games</string>
|
<string>public.app-category.games</string>
|
||||||
</dict>
|
</dict>
|
||||||
|
|
|
@ -3,15 +3,6 @@
|
||||||
# could affect the result, but much more unlikely than the following files. Keeping a list of files
|
# could affect the result, but much more unlikely than the following files. Keeping a list of files
|
||||||
# like this allows for much better caching since it doesn't force the user to recompile binary shaders every update
|
# like this allows for much better caching since it doesn't force the user to recompile binary shaders every update
|
||||||
set(VIDEO_CORE "${CMAKE_SOURCE_DIR}/src/video_core")
|
set(VIDEO_CORE "${CMAKE_SOURCE_DIR}/src/video_core")
|
||||||
if (DEFINED ENV{CI})
|
|
||||||
if (DEFINED ENV{TRAVIS})
|
|
||||||
set(BUILD_REPOSITORY $ENV{TRAVIS_REPO_SLUG})
|
|
||||||
set(BUILD_TAG $ENV{TRAVIS_TAG})
|
|
||||||
elseif(DEFINED ENV{APPVEYOR})
|
|
||||||
set(BUILD_REPOSITORY $ENV{APPVEYOR_REPO_NAME})
|
|
||||||
set(BUILD_TAG $ENV{APPVEYOR_REPO_TAG_NAME})
|
|
||||||
endif()
|
|
||||||
endif()
|
|
||||||
|
|
||||||
# Pass the path to git to the GenerateSCMRev.cmake as well
|
# Pass the path to git to the GenerateSCMRev.cmake as well
|
||||||
find_package(Git QUIET)
|
find_package(Git QUIET)
|
||||||
|
@ -19,8 +10,6 @@ find_package(Git QUIET)
|
||||||
add_custom_command(OUTPUT scm_rev.cpp
|
add_custom_command(OUTPUT scm_rev.cpp
|
||||||
COMMAND ${CMAKE_COMMAND}
|
COMMAND ${CMAKE_COMMAND}
|
||||||
-DSRC_DIR="${CMAKE_SOURCE_DIR}"
|
-DSRC_DIR="${CMAKE_SOURCE_DIR}"
|
||||||
-DBUILD_REPOSITORY="${BUILD_REPOSITORY}"
|
|
||||||
-DBUILD_TAG="${BUILD_TAG}"
|
|
||||||
-DGIT_EXECUTABLE="${GIT_EXECUTABLE}"
|
-DGIT_EXECUTABLE="${GIT_EXECUTABLE}"
|
||||||
-P "${CMAKE_SOURCE_DIR}/CMakeModules/GenerateSCMRev.cmake"
|
-P "${CMAKE_SOURCE_DIR}/CMakeModules/GenerateSCMRev.cmake"
|
||||||
DEPENDS
|
DEPENDS
|
||||||
|
|
Loading…
Reference in a new issue