1
1
name : GNUStep
2
2
3
3
on :
4
+ push :
5
+ branches : [master]
4
6
pull_request :
5
7
6
8
env :
@@ -20,58 +22,86 @@ jobs:
20
22
steps :
21
23
- uses : actions/checkout@v2
22
24
23
- - name : Cache Rust
25
+ - name : Install Clang
26
+ run : sudo apt-get install clang
27
+
28
+ - name : Cache GNUStep
29
+ id : cache-gnustep
24
30
uses : actions/cache@v2
25
31
with :
32
+ # Ideally I would have just cached build-files, and then rerun make
33
+ # every time, letting it figure out what's changed. But GNUStep-Base
34
+ # ./configure invalidates the cache, which makes it very hard to
35
+ # know when to rebuild and when not to.
36
+ # So instead we just cache the final output:
37
+ # - lib/libobjc.so
38
+ # - lib/libgnustep-base.so
39
+ # - include/Foundation/*
40
+ # - include/objc/*
41
+ # - ...
26
42
path : |
27
- ~/.cargo/
28
- target/
29
- key : gnustep-cargo-${{ hashFiles('**/Cargo.toml') }}
30
- restore-keys : |
31
- gnustep-cargo-
43
+ ~/gnustep/lib
44
+ ~/gnustep/include
45
+ key : gnustep-libobjc2_1.9-make_2.9.0-base_1.28.0
32
46
33
- - name : Install Packages
34
- run : sudo apt-get install gobjc clang make libblocksruntime-dev
47
+ - name : Setup environment
48
+ run : |
49
+ mkdir -p $HOME/gnustep
50
+ echo "PATH=$HOME/gnustep/bin:$PATH" >> $GITHUB_ENV
51
+ echo "LIBRARY_PATH=$HOME/gnustep/lib:$LIBRARY_PATH" >> $GITHUB_ENV
52
+ echo "LD_LIBRARY_PATH=$HOME/gnustep/lib:$LD_LIBRARY_PATH" >> $GITHUB_ENV
53
+ echo "CPATH=$HOME/gnustep/include:$CPATH" >> $GITHUB_ENV
54
+ ls -al ~/gnustep/* || true # Ignore failures
35
55
36
- - # Run before we install GNUStep as a "fail fast" mechanism
37
- name : Run checks
38
- uses : actions-rs/cargo@v1
39
- with :
40
- command : check
41
- args : --verbose --no-default-features
56
+ - name : Install Make
57
+ if : steps.cache-gnustep.outputs.cache-hit != 'true'
58
+ run : sudo apt-get install make
42
59
43
60
- name : Install GNUStep libobjc2
61
+ if : steps.cache-gnustep.outputs.cache-hit != 'true'
44
62
run : |
45
63
wget https://github.com/gnustep/libobjc2/archive/refs/tags/v1.9.tar.gz
46
64
tar -xzf v1.9.tar.gz
47
65
mkdir -p libobjc2-1.9/build
48
66
cd libobjc2-1.9/build
49
- cmake ../
50
- sudo make install
67
+ cmake -Wno-dev -DCMAKE_INSTALL_PREFIX=$HOME/gnustep -DTESTS=OFF ..
68
+ make install
51
69
52
70
- name : Install GNUStep make
71
+ if : steps.cache-gnustep.outputs.cache-hit != 'true'
53
72
run : |
54
73
wget https://github.com/gnustep/tools-make/archive/refs/tags/make-2_9_0.tar.gz
55
74
tar -xzf make-2_9_0.tar.gz
56
- cd tools-make-make-2_9_0
57
- ./configure --with-library-combo=ng-gnu-gnu
58
- sudo make install
75
+ mkdir -p tools-make-make-2_9_0/build
76
+ cd tools-make-make-2_9_0/build
77
+ ../configure --prefix=$HOME/gnustep --with-library-combo=ng-gnu-gnu
78
+ make install
59
79
60
80
- name : Install GNUStep-Base
81
+ if : steps.cache-gnustep.outputs.cache-hit != 'true'
61
82
run : |
62
83
wget https://github.com/gnustep/libs-base/archive/refs/tags/base-1_28_0.tar.gz
63
84
tar -xzf base-1_28_0.tar.gz
64
85
cd libs-base-base-1_28_0
65
- ./configure --disable-tls
66
- sudo make install
86
+ ./configure --prefix=$HOME/gnustep --disable-tls --disable-xslt
87
+ make install
88
+ ls -al $HOME/gnustep/*
67
89
68
- - name : Setup environment
69
- run : |
70
- ls -al /usr/local/lib
71
- ls -al /usr/local/include
72
- echo "LIBRARY_PATH=/usr/local/lib:$LIBRARY_PATH" >> $GITHUB_ENV
73
- echo "LD_LIBRARY_PATH=/usr/local/lib:$LD_LIBRARY_PATH" >> $GITHUB_ENV
74
- echo "CPATH=/usr/local/include:$CPATH" >> $GITHUB_ENV
90
+ - name : Cache Rust
91
+ uses : actions/cache@v2
92
+ with :
93
+ path : |
94
+ ~/.cargo/
95
+ target/
96
+ key : gnustep-cargo-${{ hashFiles('**/Cargo.toml') }}
97
+ restore-keys : |
98
+ gnustep-cargo-
99
+
100
+ - name : Run checks
101
+ uses : actions-rs/cargo@v1
102
+ with :
103
+ command : check
104
+ args : --verbose --no-default-features
75
105
76
106
- name : Test GNUStep
77
107
uses : actions-rs/cargo@v1
0 commit comments