Skip to content

Commit

Permalink
Set up CI with Azure Pipelines (#60)
Browse files Browse the repository at this point in the history
* Set up CI with Azure Pipelines

[skip ci]

* Update azure-pipelines.yml for Azure Pipelines

* Update azure-pipelines.yml for Azure Pipelines

* Update azure-pipelines.yml for Azure Pipelines

* Update azure-pipelines.yml for Azure Pipelines

* Update azure-pipelines.yml for Azure Pipelines

* Update azure-pipelines.yml for Azure Pipelines

* Update azure-pipelines.yml for Azure Pipelines

* Update azure-pipelines.yml for Azure Pipelines

* Update azure-pipelines.yml for Azure Pipelines

* Update azure-pipelines.yml for Azure Pipelines

* Update azure-pipelines.yml for Azure Pipelines

* Update azure-pipelines.yml for Azure Pipelines

* Update azure-pipelines.yml for Azure Pipelines

* Update azure-pipelines.yml for Azure Pipelines

* Update azure-pipelines.yml for Azure Pipelines

* Update Makefile

* Update Makefile

* Update azure-pipelines.yml for Azure Pipelines

* Update azure-pipelines.yml for Azure Pipelines

* Update azure-pipelines.yml for Azure Pipelines

* Update azure-pipelines.yml for Azure Pipelines

* Update azure-pipelines.yml for Azure Pipelines

* Update azure-pipelines.yml for Azure Pipelines
  • Loading branch information
Gericom committed Jul 1, 2019
1 parent 897403a commit e592198
Show file tree
Hide file tree
Showing 3 changed files with 106 additions and 0 deletions.
10 changes: 10 additions & 0 deletions arm7/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -30,10 +30,20 @@ CFLAGS := -g -Wall -O3\
$(ARCH)

CFLAGS += $(INCLUDE) -DARM7

ifdef ARM7_DLDI
CFLAGS += -DARM7_DLDI
endif

CXXFLAGS := $(CFLAGS) -fno-exceptions -fno-rtti


ASFLAGS := -g $(ARCH)

ifdef ARM7_DLDI
ASFLAGS += -DARM7_DLDI
endif

LDFLAGS = -specs=../ds_arm7_gbarunner.specs -g $(ARCH) -Wl,-Map,$(notdir $*).map

LIBS := -lnds7
Expand Down
16 changes: 16 additions & 0 deletions arm9/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,14 @@ ifdef ISNITRODEBUG
CFLAGS += -DISNITRODEBUG
endif

ifdef ARM7_DLDI
CFLAGS += -DARM7_DLDI
endif

ifdef ENABLE_WRAM_ICACHE
CFLAGS += -DENABLE_WRAM_ICACHE
endif

CXXFLAGS := $(CFLAGS) -fno-rtti -fno-exceptions -fnon-call-exceptions

ASFLAGS := -g $(ARCH) -march=armv5te -mtune=arm946e-s $(INCLUDE)
Expand All @@ -44,6 +52,14 @@ ifdef ISNITRODEBUG
ASFLAGS += -DISNITRODEBUG
endif

ifdef ARM7_DLDI
ASFLAGS += -DARM7_DLDI
endif

ifdef ENABLE_WRAM_ICACHE
ASFLAGS += -DENABLE_WRAM_ICACHE
endif

LDFLAGS = -specs=../ds_arm9_gbarunner.specs -g $(ARCH) -Wl,-Map,$(notdir $*.map) -nodefaultlibs


Expand Down
80 changes: 80 additions & 0 deletions azure-pipelines.yml
Original file line number Diff line number Diff line change
@@ -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

variables:
DEVKITPRO: $(Agent.TempDirectory)\bar\devkitPro
DEVKITARM: $(Agent.TempDirectory)\bar\devkitPro\devkitARM

pool:
vmImage: 'windows-latest'

steps:
- task: DownloadSecureFile@1
inputs:
secureFile: 'devkitPro.zip.001'

- task: DownloadSecureFile@1
inputs:
secureFile: 'devkitPro.zip.002'

- task: DownloadSecureFile@1
inputs:
secureFile: 'devkitPro.zip.003'

- task: DownloadSecureFile@1
inputs:
secureFile: 'devkitPro.zip.004'

- script: |
cd $(Agent.TempDirectory)
copy /b *.zip.00* newzip.zip
powershell.exe -nologo -noprofile -command "& { Add-Type -A 'System.IO.Compression.FileSystem'; [IO.Compression.ZipFile]::ExtractToDirectory('newzip.zip', 'bar'); }"
md $(Build.Repository.LocalPath)\build
displayName: 'Prepare environment'

- script: |
cd $(Build.Repository.LocalPath)
make
move s.nds $(Build.Repository.LocalPath)\build\GBARunner2_arm9dldi.nds
make clean
displayName: 'Build arm9dldi'

- script: |
cd $(Build.Repository.LocalPath)
make all ENABLE_WRAM_ICACHE=1
move s.nds $(Build.Repository.LocalPath)\build\GBARunner2_arm9dldi_wramicache.nds
make clean
displayName: 'Build arm9dldi_wramicache'

- script: |
cd $(Build.Repository.LocalPath)
make all ARM7_DLDI=1
move s.nds $(Build.Repository.LocalPath)\build\GBARunner2_arm7dldi.nds
make clean
displayName: 'Build arm7dldi'

- script: |
cd $(Build.Repository.LocalPath)
make all ARM7_DLDI=1 ENABLE_WRAM_ICACHE=1
move s.nds $(Build.Repository.LocalPath)\build\GBARunner2_arm7dldi_wramicache.nds
make clean
displayName: 'Build arm7dldi_wramicache'

- task: PublishPipelineArtifact@1
inputs:
targetPath: '$(Build.Repository.LocalPath)\\build'
artifact: 'GBARunner2 Build'

- task: GitHubRelease@0
condition: not(eq(variables['Build.Reason'], 'PullRequest'))
inputs:
gitHubConnection: Gericom2
repositoryName: '$(Build.Repository.Name)'
action: 'create'
target: '$(Build.SourceVersion)'
tagSource: 'manual'
tag: 'commit_$(Build.SourceVersion)'
assets: '$(Build.Repository.LocalPath)/build/*'
addChangeLog: false

0 comments on commit e592198

Please sign in to comment.