mirror of
https://github.com/rvtr/GodMode9i.git
synced 2025-11-02 00:11:07 -04:00
adding Azure-Pipelines to GM9i (WIP at this moment) (#31)
* first commit, this should work afaik * reduce travis to only building
This commit is contained in:
parent
9912b59971
commit
2f53eab9b5
32
.travis.yml
32
.travis.yml
@ -16,7 +16,6 @@ cache:
|
||||
|
||||
before_install:
|
||||
- curl -L https://github.com/devkitPro/pacman/releases/download/devkitpro-pacman-1.0.1/devkitpro-pacman.deb -o pacman.deb
|
||||
- sudo apt-get install -y p7zip-full
|
||||
|
||||
install:
|
||||
- sudo dpkg -i pacman.deb
|
||||
@ -29,9 +28,6 @@ script:
|
||||
- export COMMIT_TAG="$(git log --format=%h -1)"
|
||||
- export COMMIT_MESSAGE="$(git log --pretty=format:"%an - %s" -1)"
|
||||
- make
|
||||
- mkdir GodMode9i/
|
||||
- cp GodMode9i.nds GodMode9i/
|
||||
- 7z a GodMode9i.7z GodMode9i/
|
||||
|
||||
addons:
|
||||
apt:
|
||||
@ -44,35 +40,11 @@ addons:
|
||||
- lftp
|
||||
|
||||
after_success:
|
||||
- curl -o send.sh https://raw.githubusercontent.com/DS-Homebrew/travis-ci-discord-webhook/master/send.sh
|
||||
- curl -o send.sh https://raw.githubusercontent.com/DS-Homebrew/Discord-Webhooks/master/send-travis.sh
|
||||
- chmod +x send.sh
|
||||
- ./send.sh success $WEBHOOK_URL
|
||||
|
||||
after_failure:
|
||||
- curl -o send.sh https://raw.githubusercontent.com/DS-Homebrew/travis-ci-discord-webhook/master/send.sh
|
||||
- curl -o send.sh https://raw.githubusercontent.com/DS-Homebrew/Discord-Webhooks/master/send-travis.sh
|
||||
- chmod +x send.sh
|
||||
- ./send.sh failure $WEBHOOK_URL
|
||||
|
||||
before_deploy:
|
||||
- git config --local user.name "TWLBot"
|
||||
- git clone https://$GITHUB_TOKEN@github.com/TWLBot/Builds.git
|
||||
- cd Builds/extras
|
||||
- cp ../../GodMode9i.7z GodMode9i.7z
|
||||
- git stage .
|
||||
- git commit -m "GodMode9i | $COMMIT_TAG"
|
||||
- git push origin master
|
||||
- export CURRENT_DATE=$(date +'%Y%m%d-%H%M%S')
|
||||
- git tag v$CURRENT_DATE
|
||||
|
||||
deploy:
|
||||
provider: releases
|
||||
overwrite: true
|
||||
api_key: $GITHUB_TOKEN
|
||||
file: GodMode9i.7z
|
||||
skip_cleanup: true
|
||||
repo: TWLBot/Builds
|
||||
prerelease: true
|
||||
name: GodMode9i | $COMMIT_TAG
|
||||
body: $COMMIT_MESSAGE
|
||||
on:
|
||||
all_branches: true
|
||||
|
||||
80
azure-pipelines.yml
Normal file
80
azure-pipelines.yml
Normal file
@ -0,0 +1,80 @@
|
||||
# Starter pipeline
|
||||
# Start with a minimal pipeline that you can customize to build and deploy your code.
|
||||
# Add steps that build, run tests, deploy, and more:
|
||||
# https://aka.ms/yaml
|
||||
|
||||
trigger:
|
||||
branches:
|
||||
include:
|
||||
- master
|
||||
|
||||
name: $[format('{0:yyyyMMdd\-HHmmss}', pipeline.startTime)]
|
||||
|
||||
pool:
|
||||
vmImage: 'Ubuntu-16.04'
|
||||
|
||||
variables:
|
||||
CURRENT_DATE: $[format('{0:yyyyMMdd\-HHmmss}', pipeline.startTime)]
|
||||
REPOSITORY_NAME: $(Build.Repository.Name)
|
||||
COMMIT_TAG: $(git log --format=%h -1)
|
||||
BUILD_SOURCEVERSION: $(git log --format=%h -1)
|
||||
|
||||
steps:
|
||||
- script: |
|
||||
curl -L https://github.com/devkitPro/pacman/releases/download/devkitpro-pacman-1.0.1/devkitpro-pacman.deb -o pacman.deb
|
||||
sudo apt update
|
||||
sudo apt install p7zip-full haveged
|
||||
sudo dpkg -i pacman.deb
|
||||
sudo dkp-pacman -Sy
|
||||
sudo dkp-pacman -S nds-dev --noconfirm
|
||||
displayName: 'Setup environment'
|
||||
|
||||
- script: |
|
||||
echo $(TRAVIS_COMMIT)
|
||||
echo $(COMMIT_TAG)
|
||||
echo $(BUILD_SOURCEVERSION)
|
||||
displayName: 'Echo Variables'
|
||||
|
||||
- script: |
|
||||
export DEVKITPRO="/opt/devkitpro"
|
||||
export DEVKITARM="/opt/devkitpro/devkitARM"
|
||||
sudo cp libmm7.a /opt/devkitpro/libnds/lib/libmm7.a
|
||||
make
|
||||
displayName: 'Build GodMode9i'
|
||||
|
||||
- script: |
|
||||
mkdir GodMode9i/
|
||||
cp GodMode9i.nds GodMode9i/
|
||||
7z a GodMode9i.7z GodMode9i/
|
||||
cp GodMode9i.7z $(Build.ArtifactStagingDirectory)/GodMode9i.7z
|
||||
displayName: 'Pack 7z'
|
||||
|
||||
- script: |
|
||||
export COMMIT_TAG="$(git log --format=%h -1)"
|
||||
git config --global user.email "flamekat54@aol.com"
|
||||
git config --global user.name "TWLBot"
|
||||
git clone https://$GITHUB_TOKEN@github.com/TWLBot/Builds.git
|
||||
cd Builds/extras
|
||||
cp ../../GodMode9i.7z GodMode9i.7z
|
||||
git stage .
|
||||
git commit -m "GodMode9i | $COMMIT_TAG"
|
||||
git push origin master
|
||||
git tag v$CURRENT_DATE
|
||||
git log -1 --format="%H" >> travisCommit.txt
|
||||
echo "2428412f374d13bf3f378dd36bd9c69c207964a6" >> travisCommit.txt
|
||||
echo '##vso[task.setvariable variable=TRAVIS_COMMIT]$(git log -1 --format="%H")'
|
||||
displayName: "Commit to TWLBot/Builds (/extras)"
|
||||
|
||||
- script: |
|
||||
curl -o send.sh https://raw.githubusercontent.com/DS-Homebrew/discord-webhooks/master/send-azure.sh
|
||||
chmod +x send.sh
|
||||
./send.sh success $WEBHOOK_URL
|
||||
condition: succeeded()
|
||||
displayName: 'Send success webhook'
|
||||
|
||||
- script: |
|
||||
curl -o send.sh https://raw.githubusercontent.com/DS-Homebrew/discord-webhooks/master/send-azure.sh
|
||||
chmod +x send.sh
|
||||
./send.sh failure $WEBHOOK_URL
|
||||
condition: failed()
|
||||
displayName: 'Send failure webhook'
|
||||
Loading…
Reference in New Issue
Block a user