Skip to content
This repository was archived by the owner on Dec 15, 2022. It is now read-only.

Commit 3f1bb76

Browse files
authored
Update CI build
### Requirements * Filling out the template is required. Any pull request that does not include enough information to be reviewed in a timely manner may be closed at the maintainers' discretion. * All new code requires tests to ensure against regressions ### Description of the Change This PR updates CI build from Travis and Appveyor to GitHub Actions. This is motivated by the following reasons: - Travis CI API has been having some issues with status propagation, the same applies to Appveyor. - Builds on Travis are stuck sometimes. - Definition is extended to run against ubuntu, macos, and windows. - Consolidates execution into a single file, there is no disparity between configuration files. ### Alternate Designs There was another PR that adds GitHub Actions to this repository; however, it was incomplete, e.g. missing lint step, and did not clean up the previous build files. ### Benefits Fast and reliable builds. ### Possible Drawbacks Potential updates to Atom builds will have to be handled manually instead of relying on community updates to the installation scripts. ### Applicable Issues <!-- Enter any applicable Issues here -->
1 parent 2bd3e55 commit 3f1bb76

File tree

4 files changed

+90
-72
lines changed

4 files changed

+90
-72
lines changed

.github/workflows/build.yml

Lines changed: 88 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,88 @@
1+
name: build
2+
3+
on:
4+
push:
5+
branches: [ master ]
6+
pull_request:
7+
branches: [ master ]
8+
9+
# Allows you to run this workflow manually from the Actions tab
10+
workflow_dispatch:
11+
12+
jobs:
13+
test:
14+
runs-on: ${{ matrix.os }}
15+
strategy:
16+
fail-fast: false
17+
matrix:
18+
os: [ ubuntu-latest, macos-latest, windows-latest ]
19+
channel: [ stable, beta ]
20+
steps:
21+
- uses: actions/checkout@v2
22+
23+
- name: Install Atom and APM (Linux)
24+
if: ${{ matrix.os == 'ubuntu-latest' }}
25+
run: |
26+
curl -s -L "https://atom.io/download/deb?channel=${{ matrix.channel }}" -o "atom-amd64.deb"
27+
/sbin/start-stop-daemon --start --quiet --pidfile /tmp/custom_xvfb_99.pid --make-pidfile --background --exec /usr/bin/Xvfb -- :99 -ac -screen 0 1280x1024x16
28+
dpkg-deb -x atom-amd64.deb ${HOME}/atom
29+
if [ ${{ matrix.channel }} == "stable" ]; then
30+
APP_DIR="${HOME}/atom/usr/share/atom"
31+
else
32+
APP_DIR="${HOME}/atom/usr/share/atom-${{ matrix.channel }}"
33+
fi
34+
echo DISPLAY=":99" >> $GITHUB_ENV
35+
echo "${APP_DIR}" >> $GITHUB_PATH
36+
echo "${APP_DIR}/resources/app/apm/node_modules/.bin" >> $GITHUB_PATH
37+
echo "./node_modules/.bin" >> $GITHUB_PATH
38+
39+
- name: Install Atom and APM (MacOS)
40+
if: ${{ matrix.os == 'macos-latest' }}
41+
run: |
42+
curl -s -L "https://atom.io/download/mac?channel=${{ matrix.channel }}" -o "atom.zip"
43+
mkdir ${HOME}/.atom && unzip -q atom.zip -d ${HOME}/.atom
44+
if [ ${{ matrix.channel }} == "stable" ]; then
45+
APP_DIR="${HOME}/.atom/Atom.app/Contents/Resources/app"
46+
else
47+
APP_DIR="${HOME}/.atom/Atom ${{ matrix.channel }}.app/Contents/Resources/app"
48+
fi
49+
ln -s "${APP_DIR}/atom.sh" "${APP_DIR}/atom"
50+
echo "${APP_DIR}" >> $GITHUB_PATH
51+
echo "${APP_DIR}/apm/bin" >> $GITHUB_PATH
52+
echo "./node_modules/.bin" >> $GITHUB_PATH
53+
54+
- name: Install Atom and APM (Windows)
55+
if: ${{ matrix.os == 'windows-latest' }}
56+
run: |
57+
Invoke-WebRequest -Uri "https://atom.io/download/windows_zip?channel=${{ matrix.channel }}" -OutFile "atom.zip"
58+
Unzip "atom.zip"
59+
$ATOM_CHANNEL = "Atom"
60+
if ("${{ matrix.channel }}" -ne "stable") {
61+
$ATOM_CHANNEL += " "
62+
$ATOM_CHANNEL += "${{ matrix.channel }}".substring(0, 1).toupper()
63+
$ATOM_CHANNEL += "${{ matrix.channel }}".substring(1).tolower()
64+
}
65+
echo npm_config_msvs_version="2019" >> ${env:GITHUB_ENV}
66+
echo "$ATOM_CHANNEL/resources/cli" >> ${env:GITHUB_PATH}
67+
echo "$ATOM_CHANNEL/resources/app/apm/bin" >> ${env:GITHUB_PATH}
68+
echo "./node_modules/.bin" >> ${env:GITHUB_PATH}
69+
70+
- name: Print Atom and APM versions
71+
run: |
72+
atom -v
73+
apm -v
74+
75+
- name: Install dependencies
76+
run: |
77+
apm install
78+
apm clean
79+
npm install
80+
81+
- name: Test
82+
run: |
83+
atom --test spec
84+
85+
- name: Lint
86+
run: |
87+
coffeelint grammars
88+
coffeelint spec

.travis.yml

Lines changed: 0 additions & 41 deletions
This file was deleted.

README.md

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
# Java language support in Atom
2-
[![macOS Build Status](https://travis-ci.org/atom/language-java.svg?branch=master)](https://travis-ci.org/atom/language-java)
3-
[![Windows Build Status](https://ci.appveyor.com/api/projects/status/utoftje56n9u5x4h/branch/master?svg=true)](https://ci.appveyor.com/project/Atom/language-java/branch/master)
2+
![build](https://github.com/atom/language-java/workflows/build/badge.svg)
43
[![Dependency Status](https://david-dm.org/atom/language-java.svg)](https://david-dm.org/atom/language-java)
54

65
Add syntax highlighting and snippets to Java/JSP files in Atom.

appveyor.yml

Lines changed: 1 addition & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -1,29 +1 @@
1-
version: "{build}"
2-
3-
image: Visual Studio 2015
4-
5-
platform: x64
6-
7-
branches:
8-
only:
9-
- master
10-
11-
clone_depth: 10
12-
13-
skip_tags: true
14-
15-
environment:
16-
APM_TEST_PACKAGES:
17-
18-
matrix:
19-
- ATOM_CHANNEL: stable
20-
- ATOM_CHANNEL: beta
21-
22-
install:
23-
- ps: Install-Product node 4
24-
25-
build_script:
26-
- ps: iex ((new-object net.webclient).DownloadString('https://raw.githubusercontent.com/atom/ci/master/build-package.ps1'))
27-
28-
test: off
29-
deploy: off
1+
build: off

0 commit comments

Comments
 (0)