2019-09-27 21:06:18 +00:00
|
|
|
trigger:
|
|
|
|
- master
|
2022-01-03 20:51:35 +00:00
|
|
|
|
2019-09-27 21:06:18 +00:00
|
|
|
jobs:
|
|
|
|
|
|
|
|
- job: Linux
|
2022-01-03 20:56:36 +00:00
|
|
|
condition: false
|
2019-09-27 21:06:18 +00:00
|
|
|
pool:
|
2021-12-08 17:34:50 +00:00
|
|
|
vmImage: 'ubuntu-20.04'
|
2019-09-27 21:06:18 +00:00
|
|
|
steps:
|
|
|
|
- checkout: self
|
|
|
|
submodules: true
|
|
|
|
- script: |
|
2021-12-08 17:34:50 +00:00
|
|
|
sudo apt-get update
|
|
|
|
DEBIAN_FRONTEND=noninteractive sudo apt-get install -y \
|
2019-09-27 21:06:18 +00:00
|
|
|
cmake libgmp-dev libmpfr-dev libmpc-dev \
|
|
|
|
libboost-all-dev bison texinfo \
|
2019-09-28 23:35:10 +00:00
|
|
|
ruby flex curl
|
2019-09-29 08:36:10 +00:00
|
|
|
displayName: 'Install prerequisites'
|
2019-09-27 21:06:18 +00:00
|
|
|
- script: |
|
|
|
|
mkdir build
|
|
|
|
cd build
|
2019-11-11 23:07:39 +00:00
|
|
|
../build-toolchain.bash
|
2019-09-29 08:36:10 +00:00
|
|
|
displayName: 'Build'
|
2019-09-28 22:22:44 +00:00
|
|
|
- script: |
|
|
|
|
cd build
|
2019-09-29 07:46:54 +00:00
|
|
|
curl -L -O https://github.com/autc04/executor/releases/download/v0.1.0/Executor2000-0.1.0-Linux.tar.bz2
|
2019-09-28 22:22:44 +00:00
|
|
|
tar xfvj Executor2000-0.1.0-Linux.tar.bz2 Executor2000-0.1.0-Linux/bin/executor-headless
|
|
|
|
echo "executor-path=`pwd`/Executor2000-0.1.0-Linux/bin/executor-headless" > ~/.LaunchAPPL.cfg
|
|
|
|
echo "emulator=executor" >> ~/.LaunchAPPL.cfg
|
2019-11-11 23:07:39 +00:00
|
|
|
ctest --no-compress-output -T test -E Carbon || true
|
2019-09-29 08:36:10 +00:00
|
|
|
displayName: Run Tests using Executor 2000
|
2019-09-28 22:22:44 +00:00
|
|
|
- task: PublishTestResults@2
|
|
|
|
inputs:
|
|
|
|
testResultsFormat: 'CTest'
|
|
|
|
testResultsFiles: build/Testing/**/*.xml
|
|
|
|
buildPlatform: 'x86_64-linux'
|
2019-09-27 21:06:18 +00:00
|
|
|
|
|
|
|
- job: macOS
|
2022-01-03 20:56:36 +00:00
|
|
|
condition: false
|
2019-09-27 21:06:18 +00:00
|
|
|
pool:
|
2021-12-08 17:43:57 +00:00
|
|
|
vmImage: 'macOS-10.15'
|
2019-09-27 21:06:18 +00:00
|
|
|
steps:
|
|
|
|
- checkout: self
|
|
|
|
submodules: true
|
|
|
|
- script: |
|
|
|
|
brew install boost cmake gmp mpfr libmpc bison
|
2019-09-29 08:36:10 +00:00
|
|
|
displayName: 'Brew prerequisites'
|
2019-09-27 21:06:18 +00:00
|
|
|
- script: |
|
|
|
|
mkdir build
|
|
|
|
cd build
|
2019-11-11 23:07:39 +00:00
|
|
|
../build-toolchain.bash
|
2019-09-29 08:36:10 +00:00
|
|
|
displayName: Build
|
|
|
|
- script: |
|
|
|
|
cd build
|
|
|
|
curl -L -O https://github.com/autc04/executor/releases/download/v0.1.0/Executor2000-0.1.0-Darwin.tar.bz2
|
|
|
|
tar xfvj Executor2000-0.1.0-Darwin.tar.bz2 Executor2000-0.1.0-Darwin/bin/executor-headless
|
|
|
|
echo "executor-path=`pwd`/Executor2000-0.1.0-Darwin/bin/executor-headless" > ~/.LaunchAPPL.cfg
|
|
|
|
echo "emulator=executor" >> ~/.LaunchAPPL.cfg
|
2019-11-11 23:07:39 +00:00
|
|
|
ctest --no-compress-output -T test -E Carbon || true
|
2019-09-29 08:36:10 +00:00
|
|
|
displayName: Run Tests using Executor 2000
|
|
|
|
- task: PublishTestResults@2
|
|
|
|
inputs:
|
|
|
|
testResultsFormat: 'CTest'
|
|
|
|
testResultsFiles: build/Testing/**/*.xml
|
|
|
|
buildPlatform: 'x86_64-macos'
|
2021-12-08 21:40:19 +00:00
|
|
|
|
2021-12-08 21:41:50 +00:00
|
|
|
- job: nix_68k
|
2022-01-03 20:56:36 +00:00
|
|
|
condition: false
|
2021-12-08 21:40:19 +00:00
|
|
|
pool:
|
|
|
|
vmImage: 'ubuntu-20.04'
|
|
|
|
steps:
|
|
|
|
- checkout: self
|
|
|
|
submodules: true
|
|
|
|
- script: |
|
2021-12-11 17:09:08 +00:00
|
|
|
docker run -i --name nix -v`pwd`:/src nixos/nix:latest <<EOF
|
2022-01-01 15:14:27 +00:00
|
|
|
chmod 1777 /tmp
|
2021-12-11 17:09:08 +00:00
|
|
|
nix-channel --add https://nixos.org/channels/nixos-21.11 nixpkgs
|
|
|
|
nix-channel --update
|
|
|
|
nix-build src -A m68k.retro68.samples
|
|
|
|
EOF
|
2021-12-08 22:45:58 +00:00
|
|
|
displayName: Build inside nixos/nix docker
|
2021-12-08 22:14:39 +00:00
|
|
|
- script: |
|
2022-01-03 20:32:01 +00:00
|
|
|
mkdir CompiledSamples
|
|
|
|
cd CompiledSamples
|
2021-12-08 22:14:39 +00:00
|
|
|
docker cp -L nix:result - | tar x --strip-components 1
|
2021-12-08 22:45:58 +00:00
|
|
|
displayName: Copy result out of docker
|
2021-12-08 22:14:39 +00:00
|
|
|
|
2022-01-03 20:32:01 +00:00
|
|
|
- publish: CompiledSamples
|
2022-01-03 20:03:07 +00:00
|
|
|
artifact: 68K Samples
|
2021-12-08 21:40:19 +00:00
|
|
|
|
|
|
|
|
2021-12-08 21:41:50 +00:00
|
|
|
- job: nix_ppc
|
2021-12-08 21:40:19 +00:00
|
|
|
pool:
|
|
|
|
vmImage: 'ubuntu-20.04'
|
|
|
|
steps:
|
|
|
|
- checkout: self
|
|
|
|
submodules: true
|
|
|
|
- script: |
|
2021-12-11 17:09:08 +00:00
|
|
|
docker run -i --name nix -v`pwd`:/src nixos/nix:latest <<EOF
|
2022-01-01 15:14:27 +00:00
|
|
|
chmod 1777 /tmp
|
|
|
|
nix-channel --add https1://nixos.org/channels/nixos-21.11 nixpkgs
|
2021-12-11 17:09:08 +00:00
|
|
|
nix-channel --update
|
|
|
|
nix-build src -A powerpc.retro68.samples
|
|
|
|
EOF
|
2021-12-08 22:45:58 +00:00
|
|
|
displayName: Build inside nixos/nix docker
|
2021-12-08 22:14:39 +00:00
|
|
|
- script: |
|
2022-01-03 20:32:01 +00:00
|
|
|
mkdir CompiledSamples
|
|
|
|
cd CompiledSamples
|
2021-12-08 22:14:39 +00:00
|
|
|
docker cp -L nix:result - | tar x --strip-components 1
|
2021-12-08 22:45:58 +00:00
|
|
|
displayName: Copy result out of docker
|
2022-01-03 20:32:01 +00:00
|
|
|
- publish: CompiledSamples
|
2022-01-03 20:03:07 +00:00
|
|
|
artifact: PowerPC Samples
|
2022-01-03 21:28:39 +00:00
|
|
|
- script: |
|
2022-01-03 22:06:07 +00:00
|
|
|
docker start nix -i <<EOF
|
|
|
|
nix-env -iA cachix -f https://cachix.org/api/v1/install
|
|
|
|
cd src
|
|
|
|
nix-shell -A powerpc --command exit
|
2022-01-03 22:27:42 +00:00
|
|
|
nix-store -qR --include-outputs $(nix-instantiate default.nix -A powerpc) | cachix push autc04
|
2022-01-03 22:06:07 +00:00
|
|
|
EOF
|
|
|
|
displayName: Push to Cachix
|
2022-01-03 21:28:39 +00:00
|
|
|
env:
|
2022-01-03 22:06:07 +00:00
|
|
|
CACHIX_AUTH_TOKEN: $(CACHIX_AUTH_TOKEN)
|